From fa49f7eb71f91c19440bfaab79eb4b95d6126325 Mon Sep 17 00:00:00 2001 From: Martin Opat Date: Mon, 30 Dec 2024 10:42:31 +0100 Subject: [PATCH] Added a point alias to vec3 --- src/linalg/vec.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/linalg/vec.h b/src/linalg/vec.h index 7efe751..472b039 100644 --- a/src/linalg/vec.h +++ b/src/linalg/vec.h @@ -23,4 +23,6 @@ struct Vec3 { // TODO: Maybe make this into a class __host__ __device__ double dot(const Vec3& b) const { return x * b.x + y * b.y + z * b.z; } __host__ __device__ Vec3 cross(const Vec3& b) const { return Vec3(y * b.z - z * b.y, z * b.x - x * b.z, x * b.y - y * b.x); } __host__ __device__ Vec3 normalize() const { double len = sqrt(x * x + y * y + z * z); return Vec3(x / len, y / len, z / len); } -}; \ No newline at end of file +}; + +typedef Vec3 Point3; \ No newline at end of file