stoneharry / WoW-Spell-Editor

A Spell Editor for WoW versions WOTLK 3.3.5, TBC 2.4.3, or Vanilla 1.12.1.
260 stars 119 forks source link

How to Display recurring decimals accurately?? #223

Open GesiIvy128 opened 10 months ago

GesiIvy128 commented 10 months ago

When I modify the 'Real Points Per Level' and 'EffectBonusMultiplier,' if I input a decimal (for example, 0.75), after saving, upon checking again, it becomes an infinitely repeating decimal (such as 0.749999921678). How can I make this numerical value display correctly?

stoneharry commented 8 months ago

This is how floating point numbers work. Not every number is possible to represent accurately, and it approximates to the nearset value.