2.5.4.96 Sign

The Sign function returns the sign of a given number.

ABNF:

 Sign = val [val] sp ("1" / "2") ";SIGN():129"

Required Arguments:

Name: Number

Type: vDouble

An argument that specifies the operand of the calculation.

Optional Arguments:

Name: FuzzValue

Type: vDouble

An argument that specifies the tolerance. If FuzzValue is negative, the absolute value of FuzzValue is used. The default value is 1E-9 (0.000000001).

Return Value:

Type: PtgNum

This function returns a PtgNum containing the sign of Number. If Number is greater than the absolute value of FuzzValue, the function returns 1. If Number is less than the negative of the absolute value of FuzzValue, the function returns -1. Otherwise, the function returns 0.