MSUTeam / MSU

Modding Standards and Utilities for Battle Brothers
21 stars 4 forks source link

feat: add round function in math utilities to round to nearest multiple #358

Closed LordMidas closed 1 month ago

LordMidas commented 3 months ago

Should we call it round or something else e.g. roundToMultiple or roundToNearest?

LordMidas commented 3 months ago

Updated the PR with a more accurate algorithm from Taro.

Enduriel commented 2 months ago

I think we can just maximally explicit and call it roundToNearestMultiple

TaroEld commented 2 months ago

I think we can just maximally explicit and call it roundToNearestMultiple

I don't see an issue with that, yeah