mirror of
https://github.com/mpusz/mp-units.git
synced 2025-08-01 03:14:29 +02:00
refactor: point_origin_interface::op-
cleanup
This commit is contained in:
@@ -81,9 +81,9 @@ struct point_origin_interface {
|
||||
[[nodiscard]] friend constexpr Quantity auto operator-(PO1 po1, PO2 po2)
|
||||
{
|
||||
if constexpr (is_derived_from_specialization_of_v<PO1, absolute_point_origin>) {
|
||||
return -(po2.quantity_point - po2.quantity_point.absolute_point_origin);
|
||||
return po1 - po2.quantity_point;
|
||||
} else if constexpr (is_derived_from_specialization_of_v<PO2, absolute_point_origin>) {
|
||||
return po1.quantity_point - po1.quantity_point.absolute_point_origin;
|
||||
return po1.quantity_point - po2;
|
||||
} else {
|
||||
return po1.quantity_point - po2.quantity_point;
|
||||
}
|
||||
|
Reference in New Issue
Block a user