C#/XAML for HTML5 Documentation
C#/XAML for HTML5 Documentation
Reference
System
Math Class
Math Methods
Truncate Method
Truncate Method (Decimal)
Truncate Method (Double)
Math
Truncate 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#
Copy
public
static
double
Truncate
(
double
d
)
Parameters
d
Type:
System
Double
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.
d
Return value
NaN
NaN
NegativeInfinity
NegativeInfinity
PositiveInfinity
PositiveInfinity
See Also
Reference
Math Class
Truncate Overload
System Namespace