feat: added template for vec so further demensions will be easier to
implement
This commit is contained in:
@@ -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];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user