Programmer Guide/SPU Reference/ABS: Difference between revisions
From STX Wiki
Jump to navigationJump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
{{DISPLAYTITLE:{{SUBPAGENAME}}}} | {{DISPLAYTITLE:{{SUBPAGENAME}}}} | ||
Absolute value. | Absolute value. | ||
;<code>[SPU ABS <var> | ;<code>[SPU ABS <var>A</var> OUT <var>Y</var>]</code>: | ||
: | :{|class="keinrahmen" | ||
|if <var>A</var> is a number || → || <var>Y</var> = |<var>A</var>| | |||
|- | |||
|if <var>A</var> is a vector || → || <var>Y</var>[i] = |<var>A</var>[i]| | |||
|} | |||
=====Usage:===== | =====Usage:===== |
Revision as of 10:37, 28 April 2011
Absolute value.
[SPU ABS A OUT Y]
if A is a number → A| if A is a vector → A[i]|
Usage:
ABS A
Inputs:
- A
- A number or vector.
Outputs:
- Y
- A number or vector (same as type of A).