Google testing works now

This commit is contained in:
Thorben Höhne
2025-02-19 21:11:42 +01:00
parent 53dac3537e
commit 61189bdc73
14 changed files with 176 additions and 50 deletions

View File

@@ -175,8 +175,8 @@ namespace Phanes::Core::Math::Detail
static constexpr bool map(const Phanes::Core::Math::TVector2<T, S>& v1, const Phanes::Core::Math::TVector2<T, S>& v2)
{
return (Phanes::Core::Math::Abs(v1.x - v2.x) < P_FLT_INAC &&
Phanes::Core::Math::Abs(v1.y - v2.y) < P_FLT_INAC);
return (Phanes::Core::Math::Abs(v1.x - v2.x) <= P_FLT_INAC &&
Phanes::Core::Math::Abs(v1.y - v2.y) <= P_FLT_INAC);
}
};

View File

@@ -707,7 +707,7 @@ namespace Phanes::Core::Math {
*/
template<RealType T, bool S>
TVector3<T, S>& ClampToCubeV(TVector3<T, S> v1, T cubeRadius);
TVector3<T, S>& ClampToCubeV(TVector3<T, S>& v1, T cubeRadius);
/**
* Rotates vector around axis

View File

@@ -292,7 +292,7 @@ namespace Phanes::Core::Math
}
template<RealType T, bool S>
TVector3<T, S>& ClampToCubeV(TVector3<T, S> v1, T cubeRadius)
TVector3<T, S>& ClampToCubeV(TVector3<T, S>& v1, T cubeRadius)
{
Detail::compute_vec3_clamp<T, S>::map(v1, v1, cubeRadius);
return v1;