Created a page for the SIgn node. |
cleanup |
||
Line 12: | Line 12: | ||
|}} | |}} | ||
The | The '''Sign''' node takes in a number and returns a <code>-1</code>, <code>0</code>, or <code>1</code> depending on the sign of the number. | ||
== Inputs == | == Inputs == | ||
=== N (Pseudo-generic) === | === N (Pseudo-generic) === | ||
The number to check the sign of. | The number to check the sign of. | ||
Line 26: | Line 24: | ||
=== * (Pseudo-generic) === | === * (Pseudo-generic) === | ||
Returns the sign of | Returns the sign of <code>N</code> of the same type represented as a 1 (positive), a -1 (negative), or a zero (0). If <code>N</code> is <code>Infinity</code> or <code>-Infinity</code>, a <code>1</code> or <code>-1</code> is returned, respectively. If <code>N</code> is <code>NaN</code>, <code>0</code> is returned. If <code>N</code> is a type with multiple fields, each field is signed individually. | ||
== See Also == | |||
* [https://learn.microsoft.com/en-us/dotnet/api/system.math.sign Microsoft documentation for the <code>Math.Sign</code> method]. | |||
[[Category:ProtoFlux:Math]] | [[Category:ProtoFlux:Math]] |
Latest revision as of 18:38, 6 June 2024
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.