How to do this?
#2

Код:
new Float:centerX = 0.0;//center of the circle
new Float:centerY = 0.0;//center of the circle

new Float:radius = 3.0;//radius of the circle
new Float:random = frandom(0, 6.28);

new Float: px = centerX/2+floatcos(random,degrees)*radius;
new Float: py = centerY/2+floatsin(random,degrees)*radius;
	    
printf("x%f y%f",px,py);
Код:
Float:frandom(Float:max, Float:min = 0.0, dp = 4)//made by ******
{
    new Float:mul = floatpower(10.0, dp),

    imin = floatround(min * mul),
    imax = floatround(max * mul);
    return float(random(imax - imin) + imin) / mul;
}
Reply


Messages In This Thread
How to do this? - by akib - 27.11.2018, 14:56
Re: How to do this? - by Rolux - 27.11.2018, 15:30
Re: How to do this? - by akib - 28.11.2018, 00:49
Re: How to do this? - by niCe - 28.11.2018, 01:02
Re: How to do this? - by akib - 28.11.2018, 03:21
Re: How to do this? - by m4karow - 28.11.2018, 09:40
Re: How to do this? - by NaS - 28.11.2018, 16:32
Re: How to do this? - by akib - 29.11.2018, 00:11

Forum Jump:


Users browsing this thread: 1 Guest(s)