Skip to content

Commit

Permalink
make sgn return an int
Browse files Browse the repository at this point in the history
  • Loading branch information
SizzinSeal committed Jan 7, 2025
1 parent 93d4313 commit 265a8f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/units/units.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ template <isQuantity Q, isQuantity R> constexpr Q min(const Q& lhs, const R& rhs
return (lhs < rhs ? lhs : rhs);
}

template <isQuantity Q> constexpr Number sgn(const Q& lhs) {
template <isQuantity Q> constexpr int sgn(const Q& lhs) {
if (lhs.internal() > 0) return 1;
if (lhs.internal() < 0) return -1;
return 0;
Expand Down

0 comments on commit 265a8f0

Please sign in to comment.