Method Sign
- Namespace
- Gamelogic.Extensions
- Assembly
- Gamelogic.Extensions.dll
Sign(float)
Returns the sign function evaluated at the given value.
public static int Sign(float x)
Parameters
x
float
Returns
- int
1 if the given value is positive, -1 if it is negative, and 0 if it is 0.
Sign(int)
Returns the sign function evaluated at the given value.
public static int Sign(int p)
Parameters
p
int
Returns
- int
1 if the given value is positive, -1 if it is negative, and 0 if it is 0.