sign() Function

Returns the number divided by its absolute value, which is 1 if the number is positive and -1 if the number is negative.

Syntax

sign( number )

number: (Decimal) The number that will be divided by its absolute value.

Returns

Integer

Notes

If the number value is equal to zero, the function returns 1.

Examples

sign(-3) returns -1

Open in Github Built: Fri, Nov 04, 2022 (07:10:52 PM)

On This Page

FEEDBACK