Quote:
Originally Posted by Nero_3D
The "normal" RandomEx
PHP код:
RandomEx(min, max) return random(max - min) + min;
should work for any number IF max > min and (max - min) <= cellmax
well if someone still thinks that -5 > -3 than he probably should add these if statments into his function
|
Yup, some people fail to realize that -3 > -5, hence the abs/round in the function I provided, although I fixed the second part to be a little more easy to the eye.