summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'util.c')
-rw-r--r--util.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/util.c b/util.c
index e114da5..db538a3 100644
--- a/util.c
+++ b/util.c
@@ -52,6 +52,18 @@ swappt(Point *a, Point *b)
*b = t;
}
+Point2
+modulapt2(Point2 a, Point2 b)
+{
+ return (Point2){a.x*b.x, a.y*b.y, a.w*b.w};
+}
+
+Point3
+modulapt3(Point3 a, Point3 b)
+{
+ return (Point3){a.x*b.x, a.y*b.y, a.z*b.z, a.w*b.w};
+}
+
void
memsetd(double *p, double v, usize len)
{