MathF.Truncate(Single) Método
Definição
Calcula a parte integral de um número de ponto flutuante de precisão simples especificado.Calculates the integral part of a specified single-precision floating-point number.
public:
static float Truncate(float x);
public static float Truncate (float x);
static member Truncate : single -> single
Public Shared Function Truncate (x As Single) As Single
Parâmetros
- x
- Single
Um número a ser truncado.A number to truncate.
Retornos
A parte integral do x; ou seja, o número que permanece depois que os dígitos fracionários tiverem sido descartados ou um dos valores listados na tabela a seguir.The integral part of x; that is, the number that remains after any fractional digits have been discarded, or one of the values listed in the following table.
x | Valor retornadoReturn value |
|---|---|
| NaN | NaN |
| NegativeInfinity | NegativeInfinity |
| PositiveInfinity | PositiveInfinity |
Comentários
Truncate Arredonda x para o número inteiro mais próximo em direção a zero.Truncate rounds x to the nearest integer towards zero.