Skip to content

Commit

Permalink
Update vectors.h
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeshingles committed Sep 1, 2024
1 parent 582a421 commit 3c5faa6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions vectors.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ template <size_t S1, size_t S2>
return std::array<double, 3>{x[0] / t, x[1] / t, x[2] / t};
}

[[nodiscard]] [[gnu::const]] constexpr auto cross_prod(const std::array<double, 3> vec_a,
const std::array<double, 3> vec_b) {
[[nodiscard]] constexpr auto cross_prod(const std::array<double, 3> &vec_a, const std::array<double, 3> &vec_b) {
return std::array<double, 3>{(vec_a[1] * vec_b[2]) - (vec_b[1] * vec_a[2]),
(vec_a[2] * vec_b[0]) - (vec_b[2] * vec_a[0]),
(vec_a[0] * vec_b[1]) - (vec_b[0] * vec_a[1])};
Expand Down

0 comments on commit 3c5faa6

Please sign in to comment.