NumberExtensionsToIntSafeTrunc Method MediaSuite 3.1.1889.0
Safely truncates a double to int.

Namespace: StreamCoders.Helpers
Assembly: MediaBase (in MediaBase.dll) Version: 2.0.5.0 (2.0.5.0)
Syntax

public static int ToIntSafeTrunc(
	this double value
)

Parameters

value
Type: SystemDouble
The value to act on.

Return Value

Type: Int32
value as an int.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Double. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Remarks

Depending on the processor architecture, double to int conversion does not always provide the expected results when the floating point value to be converted is greater than int.MaxValue and SSE2 instruction set is used (see CVTTSD2SI).
See Also

Reference