Click or drag to resize
MathTruncate Method (Double)
Calculates the integral part of a specified double-precision floating-point number.

Namespace: System
Assembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
public static double Truncate(
	double d
)

Parameters

d
Type: SystemDouble
A number to truncate.

Return Value

Type: 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. dReturn valueNaNNaNNegativeInfinityNegativeInfinityPositiveInfinityPositiveInfinity
See Also