space-wizards / RobustToolbox

Robust multiplayer game engine, used by Space Station 14
https://spacestation14.io
Other
536 stars 394 forks source link

Provide explicit FloatMath.Clamp implementations for integer types. #1224

Closed PJB3005 closed 3 years ago

PJB3005 commented 4 years ago

Contradictory as it may sound right now FloatMath.Clamp already works via integer types due to the Clamp<T>(...) where T : IComparable<T> implementation. These are less efficient than a manual implementation though so this should provide some nice savings.

GalacticChimp commented 3 years ago

This was already fixed by you @PJB3005 , might as well close this