Name
Sgn
Synopsis
Sgn(number
)
Returns 1 if the specified number is positive, 0 if the specified number is 0, or -1 if the number is negative. Examples:
<CFOUTPUT> -1: #Sgn(-1)#<BR> -1.123: #Sgn(-1.123)#<BR> -0.123: #Sgn(-0.123)#<BR> 0: #Sgn(0)#<BR> 0.123: #Sgn(0.123)#<BR> 1: #Sgn(1)#<BR> 1.123: #Sgn(1.123)# </CFOUTPUT>
Get Programming ColdFusion now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.