summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'util.c')
-rw-r--r--util.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/util.c b/util.c
index 3ff7323..ff76ab9 100644
--- a/util.c
+++ b/util.c
@@ -4,7 +4,6 @@
#include <draw.h>
#include <memdraw.h>
#include <geometry.h>
-#include "libobj/obj.h"
#include "graphics.h"
#include "internal.h"
@@ -52,6 +51,12 @@ maxpt2(Point2 a, Point2 b)
};
}
+int
+eqpt2(Point2 a, Point2 b)
+{
+ return vec2len(subpt2(a, b)) < ε2;
+}
+
Point3
modulapt3(Point3 a, Point3 b)
{
@@ -80,6 +85,12 @@ maxpt3(Point3 a, Point3 b)
};
}
+int
+eqpt3(Point3 a, Point3 b)
+{
+ return vec3len(subpt3(a, b)) < ε2;
+}
+
void
memsetf(void *dp, float v, usize len)
{