#pragma once

// -----------------------------------------------------------------------------
// vector.h
// -----------------------------------------------------------------------------
// Minimal 3D vector type plus the arithmetic the features need: component
// operations and the Euclidean length. Aim angle math lives in
// features/aimhelper.h.
// -----------------------------------------------------------------------------

#include <cmath>

namespace sdk {

// A three-component vector used for positions, angles and velocities.
struct Vec3
{
	float x = 0.0f;
	float y = 0.0f;
	float z = 0.0f;

	// Component-wise subtraction.
	Vec3 operator-(const Vec3& other) const
	{
		return Vec3{ x - other.x, y - other.y, z - other.z };
	}

	// Component-wise addition.
	Vec3 operator+(const Vec3& other) const
	{
		return Vec3{ x + other.x, y + other.y, z + other.z };
	}

	// Scalar multiplication.
	Vec3 operator*(float scalar) const
	{
		return Vec3{ x * scalar, y * scalar, z * scalar };
	}
};

} // namespace sdk
