Page 1 of 1

Sgn, Wrap and Constrain...

Posted: Fri Oct 14, 2016 2:42 pm
by MrTAToad
... are a few more procedures I would like to see

Sgn - return the sign of a number
Wrap - Wrap a number between two ranges
Contrain - Make sure a number cant exceed two ranges

Re: Sgn, Wrap and Constrain...

Posted: Fri Oct 14, 2016 3:46 pm
by Sirius-2337
We already have sgn
Result.f = Sign(Number.f)

Returns a floating-point value representing the sign of the given number.

- Returns 0 if Number is zero.
- Returns 1 if Number is positive.
- Returns -1 if Number is negative.

Re: Sgn, Wrap and Constrain...

Posted: Fri Oct 14, 2016 4:38 pm
by MrTAToad
Was wondering why I couldn't find that...

Also Min and Max would be useful...