Int16.Sign(Int16) Método

Definición

Calcula el signo de un valor.

public:
 static int Sign(short value) = System::Numerics::INumber<short>::Sign;
public static int Sign (short value);
static member Sign : int16 -> int
Public Shared Function Sign (value As Short) As Integer

Parámetros

value
Int16

Valor cuyo signo se va a calcular.

Devoluciones

Valor positivo si es positivo, Zero si valuevalue es cero y un valor negativo si value es negativo.

Implementaciones

Comentarios

Se recomienda que una función devuelva 1, 0y -1, respectivamente.

Se aplica a