Skip to content

Instantly share code, notes, and snippets.

@ziggi
Last active January 8, 2019 20:59
Show Gist options
  • Save ziggi/26281856399e304bd66c812fa07e4b47 to your computer and use it in GitHub Desktop.
Save ziggi/26281856399e304bd66c812fa07e4b47 to your computer and use it in GitHub Desktop.
stock Float:frandom(Float:max)
{
return floatdiv(float(random(0)), floatdiv(float(cellmax), max));
}
stock Float:mathfrandom(Float:min, Float:max)
{
return floatadd(frandom(floatsub(max, min)), min);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment