From 02297fee2da3a5bfb251dc035b503e43df907efb Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Wed, 5 Oct 2022 16:25:10 -0700 Subject: [PATCH] Match and link CloseEnough --- src/Kyoto/Math/CloseEnough.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 src/Kyoto/Math/CloseEnough.cpp diff --git a/src/Kyoto/Math/CloseEnough.cpp b/src/Kyoto/Math/CloseEnough.cpp new file mode 100644 index 00000000..4bf3dd33 --- /dev/null +++ b/src/Kyoto/Math/CloseEnough.cpp @@ -0,0 +1,12 @@ +#include "Kyoto/Math/CloseEnough.hpp" + +static CVector2f svector2_Identity(0.f, 0.f); + +bool close_enough(const CVector3f& a, const CVector3f& b, float epsilon) { + return close_enough(a.GetX(), b.GetX(), epsilon) && close_enough(a.GetY(), b.GetY(), epsilon) && + close_enough(a.GetZ(), b.GetZ(), epsilon); +} + +bool close_enough(const CVector2f& a, const CVector2f& b, float epsilon) { + return close_enough(a.GetX(), b.GetX(), epsilon) && close_enough(a.GetY(), b.GetY(), epsilon); +}