gablans / unitsofmeasure

Automatically exported from code.google.com/p/unitsofmeasure
0 stars 0 forks source link

Unit.add method should be renamed "shift" #25

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
The "add" method name usually add something to a quantity. "Adding a value" 
doesn't make much sense to a coordinate system or a scale (we can "shift" a 
scale, but we usually don't said that we "add" something to a scale).

But in the current Unit API, the Unit.add(double) method is used for shifting 
the scale of measurement represented by the Unit object. While some may view 
Unit as a special kind of Quantity, if it was the case the "add" method would 
expect an argument value of opposite sign than the current JScience and UOMo 
behaviour. So the existing implementations in practice really behave like a 
"shift" operations, not "add". We should rename the method accordingly.

Original issue reported on code.google.com by martdesr...@gmail.com on 26 Jan 2013 at 6:59

GoogleCodeExporter commented 8 years ago
Fixed as of revision 241.

Original comment by martdesr...@gmail.com on 5 Feb 2013 at 7:23