qplane3::operator-: implement "inverting" the normal as 0 - normal

to avoid introducing -0, for consistency with the old code, which tended to flip normals this way.
This commit is contained in:
Eric Wasylishen 2021-10-24 14:47:02 -06:00
parent 11c3511605
commit 72b39bc576
1 changed files with 1 additions and 1 deletions

View File

@ -663,7 +663,7 @@ public:
return qvec<T, 4>(normal[0], normal[1], normal[2], dist);
}
[[nodiscard]] constexpr qplane3 operator-() const { return { -normal, -dist }; }
[[nodiscard]] constexpr qplane3 operator-() const { return {qvec<T, 3>(0, 0, 0) - normal, -dist}; }
// generic case
template<typename F>