Programmer Guide/SPU Reference/ABS: Difference between revisions

From STX Wiki
Jump to navigationJump to search
No edit summary
No edit summary
Line 2: Line 2:
Absolute value.
Absolute value.
;<code>[SPU ABS <var>A</var> OUT <var>Y</var>]</code>:  
;<code>[SPU ABS <var>A</var> OUT <var>Y</var>]</code>:  
{class="keinrahmen"
;In:
;In:
:;<var>A</var>:number or vector
:{|class="einrahmen"
|<var>A</var> ||number or vector
|}
;Out:
;Out:
:;<var>Y</var>:same type as <var>A</var>
:{|class=einrahmen
|<var>Y</var>|same type as <var>A</var>
|}
;Function:
;Function:
:{|class="keinrahmen"
:{|class="keinrahmen"

Revision as of 09:15, 2 May 2011

Absolute value.

[SPU ABS A OUT Y]

{class="keinrahmen"

In
A number or vector
Out
same type as A
Function
if A is a number Y = |A|
if A is a vector Y[i] = |A[i]|

Navigation menu

Personal tools