Skip to content

Commit

Permalink
geometry builds.
Browse files Browse the repository at this point in the history
  • Loading branch information
eggrobin committed Mar 16, 2024
1 parent c1fd187 commit c8ba210
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
13 changes: 8 additions & 5 deletions geometry/r3x3_matrix.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,16 @@ class R3x3Matrix final {
friend R3Element<Product<LS, RS>> operator*(R3Element<LS> const& left,
R3x3Matrix<RS> const& right);

template<typename LS, typename RS, typename>
template<typename LS, typename RS>
requires quantity<LS>
friend R3x3Matrix<Product<LS, RS>> operator*(LS const& left,
R3x3Matrix<RS> const& right);
template<typename LS, typename RS, typename>
template<typename LS, typename RS>
requires quantity<RS>
friend R3x3Matrix<Product<LS, RS>> operator*(R3x3Matrix<LS> const& left,
RS const& right);
template<typename LS, typename RS, typename>
template<typename LS, typename RS>
requires quantity<RS>
friend R3x3Matrix<Quotient<LS, RS>> operator/(R3x3Matrix<LS> const& left,
RS const& right);

Expand Down Expand Up @@ -160,11 +163,11 @@ R3x3Matrix<Product<LScalar, RScalar>> operator*(
LScalar const& left,
R3x3Matrix<RScalar> const& right);
template<typename LScalar, typename RScalar>
requires quantity<LScalar>
requires quantity<RScalar>
R3x3Matrix<Product<LScalar, RScalar>> operator*(R3x3Matrix<LScalar> const& left,
RScalar const& right);
template<typename LScalar, typename RScalar>
requires quantity<LScalar>
requires quantity<RScalar>
R3x3Matrix<Quotient<LScalar, RScalar>> operator/(
R3x3Matrix<LScalar> const& left,
RScalar const& right);
Expand Down
9 changes: 6 additions & 3 deletions geometry/r3x3_matrix_body.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,8 @@ R3Element<Product<LScalar, RScalar>> operator*(
}


template<typename LScalar, typename RScalar, typename>
template<typename LScalar, typename RScalar>
requires quantity<LScalar>
R3x3Matrix<Product<LScalar, RScalar>> operator*(
LScalar const& left,
R3x3Matrix<RScalar> const& right) {
Expand All @@ -353,7 +354,8 @@ R3x3Matrix<Product<LScalar, RScalar>> operator*(
left * right.rows_[Z]);
}

template<typename LScalar, typename RScalar, typename>
template<typename LScalar, typename RScalar>
requires quantity<RScalar>
R3x3Matrix<Product<LScalar, RScalar>> operator*(
R3x3Matrix<LScalar> const& left,
RScalar const& right) {
Expand All @@ -365,7 +367,8 @@ R3x3Matrix<Product<LScalar, RScalar>> operator*(
left.rows_[Z] * right);
}

template<typename LScalar, typename RScalar, typename>
template<typename LScalar, typename RScalar>
requires quantity<RScalar>
R3x3Matrix<Quotient<LScalar, RScalar>> operator/(
R3x3Matrix<LScalar> const& left,
RScalar const& right) {
Expand Down

0 comments on commit c8ba210

Please sign in to comment.