mirror of
https://github.com/danieldemus/openhab-core.git
synced 2025-01-25 19:55:48 +01:00
9e721dca36
The expectation is, that when a `DecimalType` was constructed with a `float` value, the precision of its `doubleValue()`, `floatValue()`, `toBigDecimal()` and `toString()` is preserved. But there are `float` values like `4.2f` or `37.1f` that cannot directly converted to `double` without precision loss. This commit replaces all the numerical constructors of `DecimalType` with a single constructor with a `Number` argument, so that all `float` values can be used without precision loss. NOTE: There is some special handling needed for `QuantityType` and `HSBType` because these types has a special none convential `toString` implementation. Signed-off-by: Ringo Frischmann <ringo.frischmann@kiwigrid.com> |
||
---|---|---|
.. | ||
src | ||
.classpath | ||
.project | ||
NOTICE | ||
pom.xml |