News for hackers. Stuff that matters.
Re:Aztec monks with 1/55 HP no longer die when picking up or... by CodesInChaos on Saturday April 15, 2023 @06:26AM (#35579273)
`(new_maxhp * old_hp) / old_maxhp` avoids the original problem when using integers. Though you still need to make sure your type is big enough to not overflow.

Or using fixed-point (which are a relatively simple abstraction over integers): `old_hp * (new_maxhp * old_maxhp)`.

Re:Aztec monks with 1/55 HP no longer die when picking up or... by rvnx on Saturday April 15, 2023 @03:05PM (#35583569)
They probably just added: return ROUND()... and went back to play