View Single Post
Old 01-25-2003, 04:31 PM   #7 (permalink)
mrkroket
 
Join Date: Dec 2002
Posts: 140
Default

You always can do fixed point math with integers. To use let's say 2 decimals, multiply all your real values by 100, and convert it to integers.
After all integer calculations, convert to double and divide it by 100.


(double) (RandomMinMax( (int) (min*100), (int) (max*100) ) ) / 100
mrkroket is offline   Reply With Quote