View Single Post
EightBitz
Senior Member
 
Join Date: May 2013
Posts: 1,458

Old April 10th, 2019, 11:31 AM
Quote:
Originally Posted by Farling View Post
So "(uval -1) / 2"

Does that give the correct subtraction, or should it be "(uval + 1) / 2"?
It gives the correct subtraction for the division by 2, but not, I now realize, for the final calculation. Your reply gave me this idea:

Code:
         cost = (uval - 1) / 2
         cost = round(cost,0,1) + 1
And that works.
EightBitz is offline   #5 Reply With Quote