|
Ryntrax Wanderer
Joined: 15 Mar 2004 Posts: 55 Location: USA
|
Posted: Tue Jun 29, 2004 5:45 pm
eval stuff |
Code
#SHOW {WHIFF - @bstwhiff/@bstotal}
#SHOW {HEADTURN - @bstheadturn/@bstotal}
#SHOW {SINGLE - @bstsingle/@bstotal}
#SHOW {DOUBLE - @bstdouble/@bstotal}
#SHOW {TRIPLE - @bsttriple/@bstotal}
Output
WHIFF - 3/18
HEADTURN - 3/18
SINGLE - 6/18
DOUBLE - 5/18
TRIPLE - 1/18
Desired output
WHIFF - 12%
HEADTURN - 12%
SINGLE - 12%
DOUBLE - 12%
TRIPLE - 12%
Want to divide to a 2 place decimal strip . and add %. |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Tue Jun 29, 2004 6:29 pm |
You want 12% regardless of the actual values? Easy.
#SHOW {WHIFF - 12~%}
[:o)]
Seriously, percentages are easy. Multiply the dividend by 100 before dividing.
#SHOW {WHIFF - %eval( (100 * @bstwhiff)/@bstotal)~%} |
|
|
|
Ryntrax Wanderer
Joined: 15 Mar 2004 Posts: 55 Location: USA
|
Posted: Tue Jun 29, 2004 6:35 pm |
duh thanks was thinkin to hard
|
|
|
|
|
|