-
-
Notifications
You must be signed in to change notification settings - Fork 18
sign
drewmccluskey edited this page Jan 9, 2019
·
3 revisions
Returns the sign of n
sign(n)
Argument | Description |
---|---|
Real n | The value to sign |
Returns: int
This function returns whether a number is positive, negative or neither and returns 1, -1, or 0 respectively.
int number = 5;
var quality = sign(number); //return 1
This code will sign int
number to var
quality with returning value 1.
int number = -5;
var quality = sign(number); //return -1
This code will sign int number to var quality with returning value -1.
Back to number_functions