= SGN(number)
The SGN
function is a very simple but useful mathematical function. Its main
function is to determine the sign of a number. In other words, SGN
tells you
whether a number is positive, negative, or zero. So, it returns 1 if number
is positive, 0 if number
is zero and -1 if number
is negative.
You can use SGN
inside an IF
condition to perform different actions
depending on the sign of a number, and in some cases, SGN
can make your
code more concise and readable.
Sg
If you have encountered a problem using this command, if you think there is a bug or the explanation is unclear, please open an issue for this keyword on GitHub. Thank you!