Sign
Math
The Sign node takes in a number and returns a -1
, 0
, or 1
depending on the sign of the number.
Inputs
N (Pseudo-generic)
The number to check the sign of.
Outputs
* (Pseudo-generic)
Returns the sign of N
of the same type represented as a 1 (positive), a -1 (negative), or a zero (0). If N
is Infinity
or -Infinity
, a 1
or -1
is returned, respectively. If N
is NaN
, 0
is returned. If N
is a type with multiple fields, each field is signed individually.