Round() / RoundUp() / RoundDown()

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
naw
Enthusiast
Enthusiast
Posts: 573
Joined: Fri Apr 25, 2003 4:57 pm

Round() / RoundUp() / RoundDown()

Post by naw »

Hi Fred & Team,

Could Round() perhaps be replaced with:

RoundUp(1234.56789,2) = 1234.57
RoundUp(123.45,0) = 123
Round(1234.56789,2) = 1234.57
Round(123.45,2) = 123.45
Round(123.45,0) = 123
RoundDown(1234.567,2) = 1234.56
RoundDown(1234.567,0) = 1234

- Obviously these can be done easily enough with Procedures, but it would be nice to have as part of the core language...
Ta - N