summaryrefslogtreecommitdiff
path: root/math.c
diff options
context:
space:
mode:
Diffstat (limited to 'math.c')
-rw-r--r--math.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/math.c b/math.c
index b76c049..7d16a52 100644
--- a/math.c
+++ b/math.c
@@ -456,6 +456,16 @@ static void v4_print(v4 v) {
printf("(%f, %f, %f, %f)\n", v.x, v.y, v.z, v.w);
}
+typedef struct {
+ double x, y;
+} v2d;
+
+static v2d V2D(double x, double y) {
+ v2d v;
+ v.x = x;
+ v.y = y;
+ return v;
+}
// matrices are column-major, because that's what they are in OpenGL
typedef struct {