LSL Wiki Mirror 10-5-2006: sign

HomePage :: PageIndex :: RecentChanges :: RecentlyCommented :: UserSettings ::

Sign

A sign is the property of a number representing its direction from zero. Negative numbers are prefixed with the sign "-", as in "-1". Positive numbers can be prefixed with the "+" sign, but are usually left alone. Naturally, zero has no sign.

To change a number's sign in LSL, the unary operator "-" can be used.

Example: integer number=1; number = -number;
Number will be -1.


integer | types
There is no comment on this page. [Display comments/form]