View Single Post
Old 08-10-2013, 06:29 AM   #18
DeBased
Human being with feelings
 
DeBased's Avatar
 
Join Date: Jun 2010
Location: UK
Posts: 412
Default

Quote:
Originally Posted by markheath View Post
A small documentation issue I noticed:
rand() actually seems to return a floating point number.
Right. But is it exclusive? Does it ever return exactly 1.0?

Also the (optional) input param <x> is treated as an integer (fractions are discarded) and clamped to 1, ie.:

Code:
function rand(x) (
  x = max((int)x, 1);
  ...
  );
DeBased is offline   Reply With Quote