Method | Description | |
---|---|---|
Ceiling ( this d, int precision ) : Double | ||
Floor ( this d, int precision ) : Double | ||
RealRound ( this d, int precision ) : Double |
Round number to given precision using mode MidpointRounding.AwayFromZero ie: the normal maths rounding For example: RealRound(0.165, 2) returns 0.17 and NOT 0.16
|
|
Round ( this d, int precision ) : Double |
Round number to given precision using mode MidpointRounding.ToEven If the one's digit is odd, it is changed to an even digit. Otherwise, it is left unchanged. This behavior follows IEEE Standard 754, section 4. It is sometimes called rounding to nearest, or banker's rounding. It minimizes rounding errors that result from consistently rounding a midpoint value in a single direction. For example: Round(0.165, 2) returns 0.16 and NOT 0.17 More info on http://stackoverflow.com/questions/977796/in-c-math-round2-5-result-is-2-instead-of-3-are-you-kidding-me
|
|
ToJSON ( this d ) : String | ||
tronquerDecimales ( this value ) : double |
public static Ceiling ( this d, int precision ) : Double | ||
d | this | |
precision | int | |
return | Double |
public static Floor ( this d, int precision ) : Double | ||
d | this | |
precision | int | |
return | Double |
public static RealRound ( this d, int precision ) : Double | ||
d | this | |
precision | int | |
return | Double |
public static Round ( this d, int precision ) : Double | ||
d | this | |
precision | int | |
return | Double |
public static tronquerDecimales ( this value ) : double | ||
value | this | |
return | double |