ArcBasicDocs

Sgn

Sign of a value: -1, 0 or 1.

Sgn ( value# )

Parameters

value#
the number.

Description

Gives back the sign of a number: -1 if it's below zero, 0 if it's zero, and 1 if it's above zero. Multiplying by it is a quick way to move something one step towards a target, whichever side it's on.

See also