summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/v2f.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/v2f.h b/src/v2f.h
index db085b3..3f13b29 100644
--- a/src/v2f.h
+++ b/src/v2f.h
@@ -54,6 +54,13 @@ static inline float v2f_dot(v2f_t *a, v2f_t *b)
}
+static inline v2f_t v2f_invert(v2f_t *v)
+{
+ return (v2f_t){ .x = -v->x, .y = -v->y };
+
+}
+
+
static inline float v2f_length(v2f_t *v)
{
return sqrtf(v2f_dot(v, v));
© All Rights Reserved