Wednesday, 18 January 2012

Rounding off a decimal figure

// Returns the value 1234.66.
decRound(1234.6574,2);
 
// Returns the value 1235.
decRound(1234.6574,0);
 
// Returns the value 1200.
decRound(1234.6574,-2);

No comments:

Post a Comment