#pragma once #include #include #include #include #include #include typedef float scalar_t; // Scalar value, typedef struct Vec3 // Vector or Position { scalar_t x; // horizontal scalar_t y; // horizontal scalar_t z; // vertical Vec3() : x(0), y(0), z(0) { } Vec3(float x, float y, float z) : x(x), y(y), z(z) { } Vec3 operator+(const Vec3& other) const { return Vec3(x + other.x, y + other.y, z + other.z); } Vec3 operator/(float div) const { return Vec3(x / div, y / div, z / div); } Vec3 operator-() const { return Vec3(-x, -y, -z); } } vec3_t; inline float dotProduct(vec3_t a, vec3_t b) { return a.x * b.x + a.y * b.y + a.z * b.z; }