Returns -1 if argument negative, 0 if argument zero, or 1 if argument is positive.

Syntax

Visual Basic (Declaration)
Public Shared Function sign ( _
	x As Double _
) As Integer
C#
public static int sign (
	double x
)
C++
public:
static int sign (
	double x
)

Parameters

x (Double)
The number whose sign is returned.

Return Value

-1 if the argument is negative, 0 if the argument is zero, or 1 if argument is positive.