|
Sgn
DescriptionDetermines
the sign of a number.
Returns1, if number is positive.
0, if number is 0.
-1, if number is negative.
Function syntaxSgn(number)
Parameters
Parameter
|
Description
|
number
|
A number
|
Example<h3>Sgn Example</h3>
<p>Sgn determines the sign of a number. Returns 1 if number is positive;
0 if number is 0; -1 if number is negative.
<p>Sgn(14): <cfoutput>#Sgn(14)#</cfoutput>
<p>Sgn(21-21): <cfoutput>#Sgn(21-21)#</cfoutput>
<p>Sgn(-0.007): <cfoutput>#Sgn(-0.007)#</cfoutput>
|