Click to Rate and Give Feedback
MSDN
MSDN Library
Office Development
Microsoft Office XP
Visio 2002
SDK Documentation
Functions
 SIGN function

  Switch on low bandwidth view
 
SIGN function

SIGN function

See also

Returns a value that represents the sign of a number.

Syntax

SIGN(number,fuzz)

number

The number for which you want to determine the sign.

fuzz

Optional. Specifies how close to zero the number must be in order to be considered equal to zero.

Remarks

The SIGN function returns 1 if number is positive, 0 if number is zero, or -1 if number is negative.

Fuzz helps avoid floating-point roundoff errors when a calculation is almost zero. If you do not specify a fuzz value, Microsoft Visio uses 1E-9 (0.000000001). You may want to supply a different value when you scale drawings or when you want an exact comparison.

Example 1

SIGN(-5)

Returns -1.

Example 2

SIGN(0)

Returns 0.

Example 3

SIGN(0.00000000001)

Returns 0.

Example 4

SIGN(0.00000000001,0)

Returns 1.

© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker