Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Fiddling around with random #s and odds.
#25
Quote:Part of the problem is that the C library's rand() (which was used by the old RND) returns an integer (up to 2^16 with the MSVCRT runtime, if I remember right), which FB then converts to a floating-point value, which you then convert back to an integer...

4 -> .000032 -> 0
2811 -> .0003984 -> 0 . . . .

lol Tongue
Reply


Messages In This Thread
Fiddling around with random #s and odds. - by Anonymous - 01-08-2007, 06:30 PM
Fiddling around with random #s and odds. - by Dio - 01-09-2007, 02:15 AM
Fiddling around with random #s and odds. - by Dio - 01-10-2007, 01:50 AM
Fiddling around with random #s and odds. - by Neo - 01-10-2007, 07:40 PM
Fiddling around with random #s and odds. - by DrV - 01-14-2007, 02:14 AM
Fiddling around with random #s and odds. - by TheAdventMaster - 01-14-2007, 03:10 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)