Sign

From MiniScript Wiki
Revision as of 16:06, 17 March 2020 by 71.226.33.30 (talk) (Created page with "<c>sign</c> returns -1 for negative numbers, 1 for positive numbers, and 0 for zero. === Arguments === {| class="wikitable" |- ! Parameter Name !! Default Value !! Meaning...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

sign returns -1 for negative numbers, 1 for positive numbers, and 0 for zero.


Arguments

Parameter Name Default Value Meaning
x number number to get the sign of

Example

sign(-42.6)		// returns -1