PDA

View Full Version : Is numbet between values


MerryDeer
15/12/2016, 11:19 AM
Hi,

How to check if number, float number is between values, like 5.55 i want to check is it in range +0.02 -0.02

ATomas
15/12/2016, 11:29 AM
new Float:number;

if(-0.02+5.55 < number < 0.02+5.55)
{
print("Number is between range");
}
else
{
print("Number is not between range");
}