Programmer Guide/SPU Reference/ABS: Difference between revisions
From STX Wiki
Jump to navigationJump to search
No edit summary |
No edit summary |
||
Line 7: | Line 7: | ||
|if <var>A</var> is a vector || → || <var>Y</var>[i] = <nowiki>|</nowiki><var>A</var>[i]<nowiki>|</nowiki> | |if <var>A</var> is a vector || → || <var>Y</var>[i] = <nowiki>|</nowiki><var>A</var>[i]<nowiki>|</nowiki> | ||
|} | |} | ||
Revision as of 10:56, 28 April 2011
Absolute value.
[SPU ABS A OUT Y]
if A is a number → Y = |A| if A is a vector → Y[i] = |A[i]|