|
Ralph1971 Wanderer
Joined: 01 Mar 2008 Posts: 64
|
Posted: Sat Apr 23, 2011 11:43 am
math and decimals |
Trying to find averages, and multiply them correctly..
currently, (read in as variables):
curhp=90
curlevel=11
#math curavg(@curhp/@curlevel) returns 8
#math projectedhp(@curavg*50) returns 400
I need the curavg to reflect a more accurate 8.18 (in this case) so the projectedhp reflects a more accurate 409.
I've tried to play with %float and %format.. but kinda flustered.. |
|
_________________ Win7-home - Cmud 3.33a
WinXP-pro - Zmud 7.21 |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4691 Location: Pensacola, FL, USA
|
Posted: Sat Apr 23, 2011 1:47 pm |
you need to make one of the numbers be decimal (even just .0) for it to perform float math
curavg=(%float(@curhp)/@curlevel) |
|
_________________ Discord: Shalimarwildcat |
|
|
|
|
|