azos icon indicating copy to clipboard operation
azos copied to clipboard

Review Weight and Distance

Open itadapter opened this issue 5 years ago • 3 comments

why one of them holds value in unit, another does not?

itadapter avatar Jan 21 '19 01:01 itadapter

The code in Weight.cs is pretty strange. In .ctor one passes value which then transforms to ValueInGrams and the back to original value (which saves in Value). The only effect is corruption of original value due to division, rounding and multiplication operations.

sergey-msu avatar Feb 02 '19 09:02 sergey-msu

yes, he was trying to hold the value in a a uniform unit internally. These two classes need to be re-written without looking at existing implementation but keeping the interface

itadapter avatar Feb 03 '19 00:02 itadapter

Re #512

itadapter avatar Jul 16 '21 01:07 itadapter