Commit 69649b8a authored by Julius Nehring-Wirxel's avatar Julius Nehring-Wirxel

It must be max(abs(...)) not the other way around

parent 7b9d20b7
......@@ -32,7 +32,7 @@ template <int D, class ScalarT, class = enable_if<is_floating_point<ScalarT>>>
template <int D, class ScalarT>
[[nodiscard]] constexpr bool are_orthogonal(vec<D, ScalarT> const& a, vec<D, ScalarT> const& b, ScalarT eps = 100 * D * tg::epsilon<ScalarT>)
return abs(dot(a, b)) < abs(max(max_element(a), max_element(b))) * eps;
return abs(dot(a, b)) < max(max_element(abs(a)), max_element(abs(b))) * eps;
template <int D, class ScalarT>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment