feat: add common vec2 and vec3 operations
Some checks failed
CI / build (push) Failing after 13s

This commit is contained in:
2026-03-14 17:25:54 +01:00
parent 79997dbce2
commit 5e70354ec2
4 changed files with 90 additions and 12 deletions

View File

@@ -1,12 +1,23 @@
#ifndef CURTLE_VECTOR_H
#define CURTLE_VECTOR_H
struct vec2
{
double x;
double y;
struct vec2 {
float x;
float y;
};
struct vec3 {
float x;
float y;
float z;
};
struct vec2 vec2_add(struct vec2 a, struct vec2 b);
struct vec2 vec2_sub(struct vec2 a, struct vec2 b);
float vec2_dot(struct vec2 a, struct vec2 b);
float vec2_det(struct vec2 a, struct vec2 b);
#endif