Here' a tirck I uysed for many years in the spreadsheet version of BT Crafting Ranges. For rounding to dodge parry..lets say with max = 3, min = -1, everyting from -1 to 1.99 = 1, where x = %
@ Int(X * 4) - 1
So everything from 0.76 to 0.99 was +2
0.74 x 3 = 2.96
Int(3.04) = 2
2 - 1 = 2
0.76 x 3 = 3.04
Int(3.04) = 3
3 - 1 = 2
0.99 x 4 = 3.96
Int(3.96) = 3
3 - 1 = 2
1.00 x 4 = 4.00
Int(4.00) = 4
4 - 1 = 3
I came up w/ the idea due to the limited coding capability of 1973 era Fortran. I was attempting to write a program to size concrete beams and round the depth up to nearest half inch .. for that I had to double it +1. had forgotten about it till tried to address Dodge / Parry in spreadsheet calculator. My son, the SS geek (in finance) siggested a look up table and wrote a 67 character thing which worked ... this was easier :)
@ Int(X * 4) - 1
So everything from 0.76 to 0.99 was +2
0.74 x 3 = 2.96
Int(3.04) = 2
2 - 1 = 2
0.76 x 3 = 3.04
Int(3.04) = 3
3 - 1 = 2
0.99 x 4 = 3.96
Int(3.96) = 3
3 - 1 = 2
1.00 x 4 = 4.00
Int(4.00) = 4
4 - 1 = 3
I came up w/ the idea due to the limited coding capability of 1973 era Fortran. I was attempting to write a program to size concrete beams and round the depth up to nearest half inch .. for that I had to double it +1. had forgotten about it till tried to address Dodge / Parry in spreadsheet calculator. My son, the SS geek (in finance) siggested a look up table and wrote a 67 character thing which worked ... this was easier :)
---