random(x) for result in range 0..x-1 better 0..x:
why random(x) = 0..x?
-
sec
- Enthusiast

- Posts: 792
- Joined: Sat Aug 09, 2003 3:13 am
- Location: 90-61-92 // EU or ASIA
- Contact:
why random(x) = 0..x?
why random(x) = 0..x? that isn't 0..x-1?
random(x) for result in range 0..x-1 better 0..x:
random(x) for result in range 0..x-1 better 0..x:
I think it's great with Random(x) gives you a number between 0 and x..
That way you can get any of the numbers you give, including zero.
But that's my opinion anyways..
-Lars
That way you can get any of the numbers you give, including zero.
But that's my opinion anyways..
-Lars
AMD Athlon XP2400, 512 MB RAM, Hercules 3D Prophet 9600 256MB RAM, WinXP
PIII 800MHz, 320 MB RAM, Nvidia Riva Tnt 2 Mach 64 (32MB), WinXP + Linux
17" iMac, 1.8 GHz G5, 512 MB DDR-RAM, 80 GB HD, 64 MB Geforce FX 5200, SuperDrive, OSX
-
freedimension
- Enthusiast

- Posts: 613
- Joined: Tue May 06, 2003 2:50 pm
- Location: Germany
- Contact:
Could be Blitz you're talking about.. it uses Rnd(from,to) for floating point values, and Rand(from,to) for integer values..freedimension wrote: I once had a language (don't remember which one) that had two commands for random-generation, one producing integers in a range of numbers and one producing random floats between 0 and 1. I believe they were called Random and Rand (or the other way round).
-Lars
AMD Athlon XP2400, 512 MB RAM, Hercules 3D Prophet 9600 256MB RAM, WinXP
PIII 800MHz, 320 MB RAM, Nvidia Riva Tnt 2 Mach 64 (32MB), WinXP + Linux
17" iMac, 1.8 GHz G5, 512 MB DDR-RAM, 80 GB HD, 64 MB Geforce FX 5200, SuperDrive, OSX
