[]
        
(Showing Draft Content)

C1.Framework.Mathematics.Math.Round

Round Method

Round(decimal, int)

Returns the number nearest the specified value.

Declaration
public static decimal Round(decimal value, int digits)
Parameters
Type Name Description
decimal value

A decimal number to be rounded.

int digits

The number of significant fractional digits (precision) in the return value.

Returns
Type Description
decimal

The number nearest value with precision equal to decimals.

Round(float)

To make a round mathematic operation for float type number

Declaration
public static int Round(float paraNum)
Parameters
Type Name Description
float paraNum

A float number to be rounded.

Returns
Type Description
int

The number nearest value with precision equal to float.

Round(double)

To make a round mathematic operation for double type number.

Declaration
public static int Round(double paraNum)
Parameters
Type Name Description
double paraNum

A double number to be rounded.

Returns
Type Description
int

The number nearest value with precision equal to double.