View previous topic :: View next topic |
Author |
Message |
FreezingFire Admin Team
Joined: 23 Jun 2002 Posts: 3508
|
Posted: Mon Jan 10, 2005 2:39 am Post subject: @ROUND() function |
|
|
I think it would be nice to have an @ROUND() function that allows you to
round a number. _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
Back to top |
|
|
PGWARE Web Host
Joined: 29 Dec 2001 Posts: 1563
|
Posted: Mon Jan 10, 2005 6:55 am Post subject: |
|
|
That would be a really nice function. As solution that works use the @format function:
%A = 9.63
warn @format(%A,100.0)
It seems to round correctly, try setting %A to 9.1 and it rounds to 9, at it's current value of 9.63 it rounds to 10. If you set the 100.0 to 100.1 it will let you round to the first decimal place. Seems really like a better solution for rounding as it lets you round decimals and/or whole numbers. |
|
Back to top |
|
|
jules Professional Member
Joined: 14 Sep 2001 Posts: 1043 Location: Cumbria, UK
|
Posted: Mon Jan 10, 2005 5:53 pm Post subject: |
|
|
I think that's the reason there isn't a @round() function. _________________ The Tech Pro
www.tech-pro.net |
|
Back to top |
|
|
FreezingFire Admin Team
Joined: 23 Jun 2002 Posts: 3508
|
Posted: Sun Jan 16, 2005 4:37 pm Post subject: |
|
|
Looks cool PK
I think still it would be nice to have a @round() function built in natively. _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
Back to top |
|
|
jules Professional Member
Joined: 14 Sep 2001 Posts: 1043 Location: Cumbria, UK
|
Posted: Sun Jan 16, 2005 6:20 pm Post subject: |
|
|
If there was, it would have to be @fround(), because all the functions for working with floating point numbers have names starting with f... _________________ The Tech Pro
www.tech-pro.net |
|
Back to top |
|
|
FreezingFire Admin Team
Joined: 23 Jun 2002 Posts: 3508
|
Posted: Mon Jan 17, 2005 3:05 am Post subject: |
|
|
That would be fine with me _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
Back to top |
|
|
|