Skip to content
Snippets Groups Projects
Commit 607ece8f authored by Brandon Lai-Cheong's avatar Brandon Lai-Cheong
Browse files

fixed debug check point equality

parent 626f5c58
No related branches found
No related tags found
No related merge requests found
......@@ -2,14 +2,16 @@
#include <point.h>
#include <triangle.h>
#define DEBUG_EPSILON 0.0001
bool mostlyEqual(float a, float b)
{
return abs(a - b) < 0.0001;
return abs(a - b) < DEBUG_EPSILON;
}
bool mostlyEqual(const Point &a, const Point &b)
{
return mostlyEqual(a.x, b.x) && mostlyEqual(a.y, b.y);
return mostlyEqual(a.x, b.x) && mostlyEqual(a.y, b.y) && mostlyEqual(a.z, b.z);
}
// mostly equal
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment