Table of Contents

RoundOff Method

Definition

Namespace
Cuemon.Extensions
Assemblies
Cuemon.Extensions.Core.dll
Source
src/Cuemon.Extensions.Core/DoubleExtensions.cs

RoundOff(double, RoundOffAccuracy)

Rounds a double-precision floating-point value to the nearest integral value closest to the specified accuracy.

public static double RoundOff(this double value, RoundOffAccuracy accuracy)

Parameters

value double

A double-precision floating-point number to be rounded.

accuracy RoundOffAccuracy

The accuracy to use in the rounding.

Returns

double

The integer value closest to the specified accuracy of value.
Note that this method returns a double instead of an integral type.