Truncate()

Math::Truncate(const Decimal&) method

Returns the Decimal object representing a value that has integral part equal to that of the value represented by the specified Decimal object of the with all fractional digits discarded.

static Decimal System::Math::Truncate(const Decimal &d)

Arguments

ParameterTypeDescription
dconst Decimal&A decimal number

Return Value

A Decimal object representing a decimal value whose integral part is equal to that of the specified value and fractional digits are all 0.

Math::Truncate(double) method

Returns a double-precision floating point value that has integral part equal to that of the specified value with all fractional digits discarded.

static double System::Math::Truncate(double d)

Arguments

ParameterTypeDescription
ddoubleA decimal number

Return Value

A double-precision floating point value whose integral part is equal to that of the specified value and fractional digits are all 0.

See Also