If I were you I'd start with using proper Java naming conventions, so variable and method names using CamelCase and starting with a lowercase letter, class and interface names similar but starting with an uppercase letter.
Also use meaningful names for your variables and members to make it easier to comprehend what's going on.
What is "Calculate", what is "Reset", etc. etc.?
Are you sure you're intending to use a comparison of the reference values there rather than a comparison of content?
Are you sure that your math is correct? Isn't there an implicit cast somewhere which is causing you to loose precision?
jwenting
duckman
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337