Sign()

From TinyMUX
Revision as of 05:09, 17 January 2006 by Ian (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Description

FUNCTION: sign(number)

Returns -1, 0, or 1 depending on whether its argument is negative, zero, or positive (respectively).

Related Topics: abs(), iabs(), isign().

Examples

> say sign(-4.2) You say "-1" > say sign(4.2) You say "1" > say sign(0.0) You say "0" > say sign(-1.3) You say "-1"


(--Soylent 00:30, 3 December 2005 (EST))