|
horks Apprentice
Joined: 20 Jul 2001 Posts: 127 Location: USA
|
Posted: Thu Feb 07, 2002 7:08 am
SImple Math Problem |
Hi all,
I feel really stupid for asking this, but it's late at night, and I just can't think. So I'm turning to you people at the Midnight Oil.
I want to figure out the % one number is of another, but i can't figure out how to do it with zmud ... my first idea was:
#math @percent {@portion/@total}
but then i remembered, zmud can't handle fractions ... so how do i fix this? anyone? thanks for your help |
|
|
|
HariKari Wanderer
Joined: 16 Feb 2001 Posts: 57
|
Posted: Thu Feb 07, 2002 7:14 am |
If you want a quick and easy non float number and only care about the integer part..
percent = @portion * 100 / @total |
|
|
|
iljhar GURU
Joined: 10 Oct 2000 Posts: 1116 Location: USA
|
Posted: Thu Feb 07, 2002 2:49 pm |
The Beta version allows for floating points, but don't use if it you aren't prepared to lose data, characters, your pets and possibly your pinky fingers. Well, maybe the last 2 won't happen, but nevertheless, be careful. When the new, stable version comes out, you won't have to do what HariKari suggests which, right now, is the only way to find a percentage, that I know of, at least.
Iljhar |
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|