Closed midspace closed 9 years ago
moving to decimals from doubles, good catch, doubles was just me being lazy - and i didnt think we needed that many decimal places.. (isnt a decimal just a long anyway, with an internal divide by mechanism making it transparent to the user..)
In the project notes, the following is mentioned in regards to precision of the currency.
https://github.com/jpcsupplies/Economy_mod/wiki/8.-General-notes-to-self
Double, is a floating point number, is and as such, is subject to inaccuracies over large amounts of decimal places, and it's primary purpose is speed when doing many calculations.
Decimal while a little slower, maintains precision and it's purpose is currency.
http://stackoverflow.com/questions/1165761/decimal-vs-double-which-one-should-i-use-and-when http://stackoverflow.com/questions/618535/difference-between-decimal-float-and-double-in-net
Current code where Double has been defined for holding currency, and conversion of values from string, need to be changed to Decimal.