Random и Float
#10

Quote:
Originally Posted by stabker
View Post
pawn Code:
stock Float: floatrandom(Float: fMin, Float: fMax, iDig)
{
    iDig = _: floatpower(10.0, iDig);
    fMin = Float: (floatround(fMin * Float: iDig));
    fMax = Float: (floatround(fMax * Float: iDig));
    return (random((_: fMax - _: fMin)) + _: fMin) / Float: iDig;
}
Почему везде приведение типа, а не преобразование?
Reply


Messages In This Thread
Random и Float - by AlexeyTrekkkk - 31.07.2014, 20:44
Re: Random и Float - by AlexeyTrekkkk - 31.07.2014, 20:52
Re: Random и Float - by AlexeyTrekkkk - 31.07.2014, 20:54
Re: Random и Float - by stabker - 31.07.2014, 21:16
Re: Random и Float - by AlexeyTrekkkk - 31.07.2014, 22:10
Re: Random и Float - by Diman777 - 08.01.2017, 21:04
Re: Random и Float - by ZiGGi - 09.01.2017, 04:37
Re: Random и Float - by Diman777 - 09.01.2017, 14:38
Re: Random и Float - by ZiGGi - 09.01.2017, 14:42
Re: Random и Float - by Stepashka - 09.01.2017, 16:26
Re: Random и Float - by stabker - 09.01.2017, 17:15
Re: Random и Float - by ZiGGi - 09.01.2017, 18:16
Re: Random и Float - by stabker - 09.01.2017, 21:27
Re: Random и Float - by Diman777 - 09.01.2017, 21:59
Re: Random и Float - by stabker - 09.01.2017, 23:12

Forum Jump:


Users browsing this thread: 3 Guest(s)