26.09.2018, 11:58
(
Последний раз редактировалось v1k1nG; 26.09.2018 в 13:10.
)
Nothing, I am getting tag mismatch warning at
Also I was looking for the FloatRandom function in YSI files, but I didn't manage to find the file to include yet.
EDIT
It compiles, but does not seem to work though
PHP код:
return float(random(imax - imin) + imin) / mul;
EDIT
It compiles, but does not seem to work though
PHP код:
Float:frandom(Float:max, Float:min = 0.0, dp = 4)
{
new
// Get the multiplication for storing fractional parts.
Float:mul = floatpower(10.0, dp),
// Get the max and min as integers, with extra dp.
imin = floatround(min * mul),
imax = floatround(max * mul);
new Float: x = float(random(imax - imin) + imin) / mul;
// Get a random int between two bounds and convert it to a float.
return x;
}