As the title suggest, is there more convenient way of doing this? I have to do this about 100 times and I don't think I want to type that much..
Here is the code:
Here is the code:
Code:
if (Distance <= 200)
{
SPAccuracy = 0.15;
}
else if (Distance > 200 && Distance <= 300)
{
SPAccuracy = 0.1715;
}
else if (Distance > 300 && Distance <= 400)
{
SPAccuracy = 0.193;
}
else if (Distance > 400 && Distance <= 500)
{
SPAccuracy = 0.2145;
}
else if (Distance > 500 && Distance <= 600)
{
SPAccuracy = 0.236;
}
else if (Distance > 600 && Distance <= 700)
{
SPAccuracy = 0.2575;
}
else if (Distance > 700 && Distance <= 800)
{
SPAccuracy = 0.279;
}
Last edited: