Table of Contents

Method RoundHalfAwayFromZeroToInt64

Namespace
DocWright.Core.Primitives
Assembly
DocWright.Core.dll

RoundHalfAwayFromZeroToInt64(double)

Rounds a floating-point value to the nearest 64-bit integer, rounding midpoints away from zero.

public static long RoundHalfAwayFromZeroToInt64(double value)

Parameters

value double

The value to round. Must be finite.

Returns

long

The rounded value.

Exceptions

ArgumentOutOfRangeException

The value is NaN or infinite.

OverflowException

The rounded value does not fit in a long.