math.sgn

Syntax

rn := math.sgn(n)

Get the sign. If n < 0, then rn = -1, otherwise rn = 1.

Returns:

rn - -1 or 1

Arguments:

n - number