Int32.Sign(Int32) Método

Definição

Calcula o sinal de um valor.

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

Parâmetros

value
Int32

Retornos

Int32

Um valor positivo se value for positivo, Zero se value for zero e um valor negativo se value for negativo.

Implementações

Comentários

É recomendável que uma função retorne 1, 0e -1, respectivamente.

Aplica-se a