feat: quantity_from_zero() enabled for absolute point origins

This commit is contained in:
Mateusz Pusz committed 2023-12-22 16:41:14 +01:00
1 parent a962182e13
commit f2abaa28bc
4 files changed
+21 -19

No files matched your search

+5 -7
View File
@@ -266,13 +266,11 @@ public:
const auto q = quantity_from(unit.point_origin);
if constexpr (requires { q.in(unit); })
// restore the unit if possible (non-truncating)
// original quantity point unit can be lost in the below operation
const auto q = quantity_from(zeroth_point_origin(R));
if constexpr (requires { q.in(unit); })
// restore it if possible (non-truncating)
return q.in(unit);
else
return q;
return q.in(unit);
else
return q;
} else
return quantity_from(absolute_point_origin);
}
// unit conversions