Working on a golf points (instead of stroke) calculator. I have run into a brick wall on trying to:
Scenario: If I need 20 points on a given round and I pull 23, I am plus 3. I need to round that plus 3 up to 4, take half and add to the 20 needed which will make the next round needed 22. On an even number, I would just take half and add to the points.
Where I am really lost is incorporating minus numbers.
In that scenario, if I only pull 18, then it would be half the minus 2 from 20 leaving 19 next round. If I am minus an odd number, say minus 3, we don’t round up, we round down which would be 1.
In summary, any plus number round up if odd, and divide by two. If minus odd number, I guess round ‘down’ and divide by two.
I am trying to create a query that will account for both but haven’t the foggiest how to do that. Appreciate any help / guidance.
Scenario: If I need 20 points on a given round and I pull 23, I am plus 3. I need to round that plus 3 up to 4, take half and add to the 20 needed which will make the next round needed 22. On an even number, I would just take half and add to the points.
Where I am really lost is incorporating minus numbers.
In that scenario, if I only pull 18, then it would be half the minus 2 from 20 leaving 19 next round. If I am minus an odd number, say minus 3, we don’t round up, we round down which would be 1.
In summary, any plus number round up if odd, and divide by two. If minus odd number, I guess round ‘down’ and divide by two.
I am trying to create a query that will account for both but haven’t the foggiest how to do that. Appreciate any help / guidance.