MathNTruncateTNumeric Method

Calculates the integral part of a specified number.

Definition

Namespace: Jodosoft.Numerics
Assembly: Jodosoft.Numerics (in Jodosoft.Numerics.dll) Version: 2.0
public static TNumeric Truncate<TNumeric>(
	TNumeric x
)
where TNumeric : struct, new(), INumeric<TNumeric>

Parameters

x  TNumeric
A number to truncate.

Type Parameters

TNumeric

Return Value

TNumeric
The integral part of x; that is, the number that remains after any fractional digits have been discarded.

Remarks

This method may return NaN or Infinity. If NaN or Infinity cannot be represented by TNumeric, then this method may throw an ArithmeticException.

See Also