summaryrefslogtreecommitdiff
path: root/math.c
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2021-02-23 14:30:49 -0500
committerLeo Tenenbaum <pommicket@gmail.com>2021-02-23 14:30:49 -0500
commit88f7f5f8675a15d567837bd076e39e09bfe1aa74 (patch)
tree2b12ed6c901fbed71abe88a5420c5e2841155b6f /math.c
parentf4172376d933c5c9033ff421f04db828825f9017 (diff)
goto line preview
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 {