Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Calculates the integral part of a specified double-precision floating-point number.
Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Syntax
'Declaration
Public Shared Function Truncate ( _
d As Double _
) As Double
public static double Truncate(
double d
)
public:
static double Truncate(
double d
)
static member Truncate :
d:float -> float
public static function Truncate(
d : double
) : double
Parameters
- d
Type: System. . :: . .Double
A number to truncate.
Return Value
Type: System. . :: . .Double
The integral part of d; that is, the number that remains after any fractional digits have been discarded, or one of the values listed in the following table.
d |
Return value |
---|---|
Remarks
Truncate rounds d to the nearest integer towards zero.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see dd66cd4c-b087-415f-9c3e-94e3a1835f74.