Skip to content

Commit

Permalink
refactor: point_origin_interface::op- cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
mpusz committed Nov 2, 2024
1 parent 93e112f commit 9d05e31
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/include/mp-units/framework/quantity_point.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 9d05e31

Please sign in to comment.