Quote:
Originally Posted by FireCat
That "iDig" is...?
Edit: and how would I use the function? What does it return ? e.e
|
Yeah sorry, I was kinda in a hurry.
iDig is the amount of significant digits. A basic example would be:
pawn Код:
#define SIGNIFICANT_DIGITS (3)
printf("%.*f", SIGNIFICANT_DIGITS, randomFloat(6.123, 11.5, SIGNIFICANT_DIGITS)); // Possible output: 8.465
This would generate a random float between 6.123 and 11.548 with a maximum of 3 significant digits (465).
Quote:
Originally Posted by ******
I don't think you've tested that! I can see at least one issue arising from your bizarre reuse of variables and the associated mash of tag overrides. I seem to recall another post of yours I commented on recently with odd float usage too.
|
No, I have tested it a couple of times and it did actually work with no problems.