bakkesmodorg / BakkesModSDK

The current BakkesModSDK (Unofficial SDK for Rocket League)
http://bakkesmod.com
223 stars 49 forks source link

Make to_string_with_precision respect precision argument for a_value 0 #66

Open MatthewRock opened 1 year ago

MatthewRock commented 1 year ago

When using to_string_with_precision for a value close enough to 0, the return value is "0.0000" no matter what the precision is set. This PR changes the behavior to use the same code path for both 0 and non-0 values, only with a different argument. This makes the precision be respected in case of argument roughly equal to 0.