Thread
:
Portable, self-contained replacements for RANDOM_STUFF()
View Single Post
Re: Portable, self-contained replacements for RANDOM_STUFF()
(#
2
)
Pierre-Marie Baty
Roi de France
Status:
Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Re: Portable, self-contained replacements for RANDOM_STUFF() -
07-01-2004
aha, one feature is missing though.
To make them behave exactly like the engine's RANDOM_LONG() and RANDOM_FLOAT(), add this check on top of the RandomLong() and RandomFloat() functions:
PHP Code:
if (
to
<=
from
)
return (
from
);
RACC home
-
Bots-United
: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
Pierre-Marie Baty
View Public Profile
Send a private message to Pierre-Marie Baty
Visit Pierre-Marie Baty's homepage!
Find More Posts by Pierre-Marie Baty