feat: added template for vec so further demensions will be easier to

implement
This commit is contained in:
2025-11-06 15:06:03 +01:00
parent a921fb27b1
commit a27a11603b
2 changed files with 105 additions and 51 deletions

View File

@@ -2,7 +2,6 @@
#define POLYGON_H
#include "fastmath.hpp"
struct polygon {
const vec3 points[3];
@@ -15,7 +14,7 @@ struct polygon {
int n = (i + 1) % 3;
vec3 d = points[n] - points[i];
d = vec3(d.y, -d.x, d.z);
d = vec3(d.y(), -d.x(), d.z());
vec3 s = p - points[n];