Determines the sign of a number.
Sgn(number
)
Parameter |
Description |
---|---|
number |
A number |
<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>