Added a point alias to vec3

This commit is contained in:
Martin committed 2024-12-30 10:42:31 +01:00
1 parent 98935c34e4
commit fa49f7eb71
1 file changed
+2
+2
View File
@@ -24,3 +24,5 @@ struct Vec3 { // TODO: Maybe make this into a class
__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 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); } __host__ __device__ Vec3 normalize() const { double len = sqrt(x * x + y * y + z * z); return Vec3(x / len, y / len, z / len); }
}; };
typedef Vec3 Point3;
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.