GoldenGnu / jeveassets

jEveAssets is an out-of-game asset manager for Eve-Online, written in Java
http://eve.nikr.net/jeveasset
GNU General Public License v2.0
155 stars 39 forks source link

Fix #413 #414

Closed RichterL closed 1 year ago

RichterL commented 1 year ago

fix for issue #413

roundQuantity() does the rounding to two decimal places and returns correctly, but is immediately ceiled in the caller method roundManufacturingQuantity(). I removed the ceil in the caller method and moved it to roundQuantity() instead of Math.round(). Precision was increased to 6 digits in order to preserve precision for multiplying the stokpile.

GoldenGnu commented 1 year ago

You will need to add your name and/or alias as a contributor to: https://github.com/GoldenGnu/jeveassets/blob/master/src/main/java/net/nikr/eve/jeveasset/gui/dialogs/AboutDialog.java#L100 https://github.com/GoldenGnu/jeveassets/blob/master/credits.txt#L28

I will review the PR over the weekend. Thank you very much for your contribution! 👍

GoldenGnu commented 1 year ago

This it turned out to be rather complicated to test. I ended up writing tests to compare it to IPH and fuzzwork (as I count those as the most reliable). Since your code did not match those and I was already working on it, I ended up writing my own implementation.

So, Good news, The bug will be fixed in the next release Bad news, I'm going to reject your PR.

RichterL commented 1 year ago

That's alright. I'm glad you fixed it in the end :+1: