NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Math.Rint

Returns a number rounded to the nearest integer.

[Visual Basic]
Public Shared Function Rint( _
   ByVal a As Double _
) As Long
[C#]
public static long Rint(
   double a
);
[C++]
public: static __int64 Rint(
   double a
);
[JScript]
public static function Rint(
   a : double
) : long;

Parameters

a
The number to be rounded.

Return Value

a rounded to the nearest integer. If a is exactly halfway between two whole numbers, this method returns the the integer that is even (i.e., Rint rounds up to the even number).

Example

Math.Rint (4.4) returns 4.0.
Math.Rint (4.5) returns 5.0.
Math.Rint (4.6) returns 5.0.

See Also

Math Class | Math Members | System Namespace