mirror of
https://github.com/orange-cpp/omath.git
synced 2026-02-13 07:03:25 +00:00
Merge pull request #11 from orange-cpp/u/orange_cpp/moved_to_hpp
moving to hpp & addition improvements
This commit is contained in:
@@ -4,9 +4,9 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "omath/Vector3.h"
|
||||
#include "omath/Vector3.hpp"
|
||||
#include <cstdint>
|
||||
#include "omath/Vector4.h"
|
||||
#include "omath/Vector4.hpp"
|
||||
|
||||
|
||||
namespace omath
|
||||
@@ -6,25 +6,24 @@
|
||||
#include <array>
|
||||
#include <sstream>
|
||||
#include <utility>
|
||||
#include "Vector3.h"
|
||||
#include "Vector3.hpp"
|
||||
#include <stdexcept>
|
||||
#include "Angles.h"
|
||||
#include "Angles.hpp"
|
||||
|
||||
|
||||
namespace omath
|
||||
{
|
||||
template <size_t Rows, size_t Columns>
|
||||
template<size_t Rows, size_t Columns, class Type = float>
|
||||
class Mat final
|
||||
{
|
||||
public:
|
||||
|
||||
constexpr Mat()
|
||||
{
|
||||
Clear();
|
||||
}
|
||||
|
||||
|
||||
constexpr Mat(const std::initializer_list<std::initializer_list<float>>& rows)
|
||||
constexpr Mat(const std::initializer_list<std::initializer_list<Type> > &rows)
|
||||
{
|
||||
if (rows.size() != Rows)
|
||||
throw std::invalid_argument("Initializer list rows size does not match template parameter Rows");
|
||||
@@ -33,7 +32,8 @@ namespace omath
|
||||
for (size_t i = 0; i < Rows; ++i, ++rowIt)
|
||||
{
|
||||
if (rowIt->size() != Columns)
|
||||
throw std::invalid_argument("All rows must have the same number of columns as template parameter Columns");
|
||||
throw std::invalid_argument(
|
||||
"All rows must have the same number of columns as template parameter Columns");
|
||||
|
||||
auto colIt = rowIt->begin();
|
||||
for (size_t j = 0; j < Columns; ++j, ++colIt)
|
||||
@@ -44,13 +44,13 @@ namespace omath
|
||||
}
|
||||
|
||||
|
||||
constexpr Mat(const Mat& other)
|
||||
constexpr Mat(const Mat &other) noexcept
|
||||
{
|
||||
m_data = other.m_data;
|
||||
}
|
||||
|
||||
|
||||
constexpr Mat(Mat&& other) noexcept
|
||||
constexpr Mat(Mat &&other) noexcept
|
||||
{
|
||||
m_data = std::move(other.m_data);
|
||||
}
|
||||
@@ -62,24 +62,26 @@ namespace omath
|
||||
static consteval size_t ColumnsCount() noexcept { return Columns; }
|
||||
|
||||
[[nodiscard]]
|
||||
static consteval std::pair<size_t, size_t> Size() noexcept { return { Rows, Columns }; }
|
||||
static consteval std::pair<size_t, size_t> Size() noexcept { return {Rows, Columns}; }
|
||||
|
||||
|
||||
[[nodiscard]] constexpr const float& At(const size_t rowIndex, const size_t columnIndex) const
|
||||
[[nodiscard]] constexpr const Type &At(const size_t rowIndex, const size_t columnIndex) const
|
||||
{
|
||||
if (rowIndex >= Rows || columnIndex >= Columns)
|
||||
throw std::out_of_range("Index out of range");
|
||||
|
||||
return m_data[rowIndex * Columns + columnIndex];
|
||||
}
|
||||
[[nodiscard]] constexpr float& At(const size_t rowIndex, const size_t columnIndex)
|
||||
|
||||
[[nodiscard]] constexpr Type &At(const size_t rowIndex, const size_t columnIndex)
|
||||
{
|
||||
return const_cast<float&>(std::as_const(*this).At(rowIndex, columnIndex));
|
||||
return const_cast<Type &>(std::as_const(*this).At(rowIndex, columnIndex));
|
||||
}
|
||||
|
||||
[[nodiscard]]
|
||||
constexpr float Sum() const
|
||||
constexpr Type Sum() const noexcept
|
||||
{
|
||||
float sum = 0.f;
|
||||
Type sum = 0;
|
||||
for (size_t i = 0; i < Rows; ++i)
|
||||
for (size_t j = 0; j < Columns; ++j)
|
||||
sum += At(i, j);
|
||||
@@ -87,25 +89,26 @@ namespace omath
|
||||
return sum;
|
||||
}
|
||||
|
||||
constexpr void Clear()
|
||||
constexpr void Clear() noexcept
|
||||
{
|
||||
Set(0.f);
|
||||
Set(0);
|
||||
}
|
||||
|
||||
constexpr void Set(const float value)
|
||||
constexpr void Set(const Type &value) noexcept
|
||||
{
|
||||
std::ranges::fill(m_data, value);
|
||||
}
|
||||
|
||||
// Operator overloading for multiplication with another Mat
|
||||
template <size_t OtherColumns>
|
||||
constexpr Mat<Rows, OtherColumns> operator*(const Mat<Columns, OtherColumns>& other) const
|
||||
template<size_t OtherColumns>
|
||||
constexpr Mat<Rows, OtherColumns> operator*(const Mat<Columns, OtherColumns> &other) const
|
||||
{
|
||||
Mat<Rows, OtherColumns> result;
|
||||
|
||||
for (size_t i = 0; i < Rows; ++i)
|
||||
for (size_t j = 0; j < OtherColumns; ++j)
|
||||
{
|
||||
float sum = 0.f;
|
||||
Type sum = 0;
|
||||
for (size_t k = 0; k < Columns; ++k)
|
||||
sum += At(i, k) * other.At(k, j);
|
||||
result.At(i, j) = sum;
|
||||
@@ -113,7 +116,7 @@ namespace omath
|
||||
return result;
|
||||
}
|
||||
|
||||
constexpr Mat& operator*=(float f)
|
||||
constexpr Mat &operator*=(Type f) noexcept
|
||||
{
|
||||
for (size_t i = 0; i < Rows; ++i)
|
||||
for (size_t j = 0; j < Columns; ++j)
|
||||
@@ -121,20 +124,20 @@ namespace omath
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <size_t OtherColumns>
|
||||
constexpr Mat<Rows, OtherColumns> operator*=(const Mat<Columns, OtherColumns>& other)
|
||||
template<size_t OtherColumns>
|
||||
constexpr Mat<Rows, OtherColumns> operator*=(const Mat<Columns, OtherColumns> &other)
|
||||
{
|
||||
return *this = *this * other;
|
||||
}
|
||||
|
||||
constexpr Mat operator*(float f) const
|
||||
constexpr Mat operator*(const Type &f) const noexcept
|
||||
{
|
||||
Mat result(*this);
|
||||
result *= f;
|
||||
return result;
|
||||
}
|
||||
|
||||
constexpr Mat& operator/=(float f)
|
||||
constexpr Mat &operator/=(const Type &f) noexcept
|
||||
{
|
||||
for (size_t i = 0; i < Rows; ++i)
|
||||
for (size_t j = 0; j < Columns; ++j)
|
||||
@@ -142,14 +145,14 @@ namespace omath
|
||||
return *this;
|
||||
}
|
||||
|
||||
constexpr Mat operator/(float f) const
|
||||
constexpr Mat operator/(const Type &f) const noexcept
|
||||
{
|
||||
Mat result(*this);
|
||||
result /= f;
|
||||
return result;
|
||||
}
|
||||
|
||||
constexpr Mat& operator=(const Mat& other)
|
||||
constexpr Mat &operator=(const Mat &other) noexcept
|
||||
{
|
||||
if (this == &other)
|
||||
return *this;
|
||||
@@ -159,7 +162,7 @@ namespace omath
|
||||
return *this;
|
||||
}
|
||||
|
||||
constexpr Mat& operator=(Mat&& other) noexcept
|
||||
constexpr Mat &operator=(Mat &&other) noexcept
|
||||
{
|
||||
if (this == &other)
|
||||
return *this;
|
||||
@@ -172,7 +175,7 @@ namespace omath
|
||||
}
|
||||
|
||||
[[nodiscard]]
|
||||
constexpr Mat<Columns, Rows> Transpose() const
|
||||
constexpr Mat<Columns, Rows> Transpose() const noexcept
|
||||
{
|
||||
Mat<Columns, Rows> transposed;
|
||||
for (size_t i = 0; i < Rows; ++i)
|
||||
@@ -183,7 +186,7 @@ namespace omath
|
||||
}
|
||||
|
||||
[[nodiscard]]
|
||||
constexpr float Determinant() const
|
||||
constexpr Type Determinant() const
|
||||
{
|
||||
static_assert(Rows == Columns, "Determinant is only defined for square matrices.");
|
||||
|
||||
@@ -194,10 +197,10 @@ namespace omath
|
||||
return At(0, 0) * At(1, 1) - At(0, 1) * At(1, 0);
|
||||
else
|
||||
{
|
||||
float det = 0.f;
|
||||
Type det = 0;
|
||||
for (size_t i = 0; i < Columns; ++i)
|
||||
{
|
||||
const float cofactor = (i % 2 == 0 ? 1.f : -1.f) * At(0, i) * Minor(0, i).Determinant();
|
||||
const Type cofactor = (i % 2 == 0 ? 1 : -1) * At(0, i) * Minor(0, i).Determinant();
|
||||
det += cofactor;
|
||||
}
|
||||
return det;
|
||||
@@ -225,7 +228,7 @@ namespace omath
|
||||
}
|
||||
|
||||
[[nodiscard]]
|
||||
std::string ToString() const
|
||||
std::string ToString() const noexcept
|
||||
{
|
||||
std::ostringstream oss;
|
||||
for (size_t i = 0; i < Rows; ++i)
|
||||
@@ -243,58 +246,59 @@ namespace omath
|
||||
|
||||
// Static methods that return fixed-size matrices
|
||||
[[nodiscard]]
|
||||
constexpr static Mat<4, 4> ToScreenMat(const float screenWidth, const float screenHeight)
|
||||
constexpr static Mat<4, 4> ToScreenMat(const Type &screenWidth, const Type &screenHeight) noexcept
|
||||
{
|
||||
return
|
||||
{
|
||||
{screenWidth / 2.f, 0.f, 0.f, 0.f},
|
||||
{0.f, -screenHeight / 2.f, 0.f, 0.f},
|
||||
{0.f, 0.f, 1.f, 0.f},
|
||||
{screenWidth / 2.f, screenHeight / 2.f, 0.f, 1.f},
|
||||
{screenWidth / 2, 0, 0, 0},
|
||||
{0, -screenHeight / 2, 0, 0},
|
||||
{0, 0, 1, 0},
|
||||
{screenWidth / 2, screenHeight / 2, 0, 1},
|
||||
};
|
||||
}
|
||||
|
||||
[[nodiscard]]
|
||||
constexpr static Mat<4, 4> TranslationMat(const Vector3& diff)
|
||||
constexpr static Mat<4, 4> TranslationMat(const Vector3 &diff) noexcept
|
||||
{
|
||||
return
|
||||
{
|
||||
{1.f, 0.f, 0.f, 0.f},
|
||||
{0.f, 1.f, 0.f, 0.f},
|
||||
{0.f, 0.f, 1.f, 0.f},
|
||||
{diff.x, diff.y, diff.z, 1.f},
|
||||
{1, 0, 0, 0},
|
||||
{0, 1, 0, 0},
|
||||
{0, 0, 1, 0},
|
||||
{diff.x, diff.y, diff.z, 1},
|
||||
};
|
||||
}
|
||||
|
||||
[[nodiscard]]
|
||||
constexpr static Mat<4, 4> OrientationMat(const Vector3& forward, const Vector3& right, const Vector3& up)
|
||||
constexpr static Mat<4, 4> OrientationMat(const Vector3 &forward, const Vector3 &right,
|
||||
const Vector3 &up) noexcept
|
||||
{
|
||||
return
|
||||
{
|
||||
{right.x, up.x, forward.x, 0.f},
|
||||
{right.y, up.y, forward.y, 0.f},
|
||||
{right.z, up.z, forward.z, 0.f},
|
||||
{0.f, 0.f, 0.f, 1.f},
|
||||
{right.x, up.x, forward.x, 0},
|
||||
{right.y, up.y, forward.y, 0},
|
||||
{right.z, up.z, forward.z, 0},
|
||||
{0, 0, 0, 1},
|
||||
};
|
||||
}
|
||||
|
||||
[[nodiscard]]
|
||||
constexpr static Mat<4, 4> ProjectionMat(const float fieldOfView, const float aspectRatio,
|
||||
const float near, const float far, const float lensZoom)
|
||||
constexpr static Mat<4, 4> ProjectionMat(const Type &fieldOfView, const Type &aspectRatio,
|
||||
const Type &near, const Type &far, const Type &lensZoom) noexcept
|
||||
{
|
||||
const float fovHalfTan = std::tan(angles::DegreesToRadians(fieldOfView) / 2.f);
|
||||
const float frustumHeight = far - near;
|
||||
const Type &fovHalfTan = std::tan(angles::DegreesToRadians(fieldOfView) / 2);
|
||||
const Type &frustumHeight = far - near;
|
||||
|
||||
return
|
||||
{
|
||||
{-1.f / (aspectRatio * fovHalfTan) * lensZoom, 0.f, 0.f, 0.f},
|
||||
{0.f, -1.f / fovHalfTan * lensZoom, 0.f, 0.f},
|
||||
{0.f, 0.f, -far / frustumHeight, -1},
|
||||
{0.f, 0.f, near * far / frustumHeight, 0.f}
|
||||
{-1 / (aspectRatio * fovHalfTan) * lensZoom, 0, 0, 0},
|
||||
{0, -1 / fovHalfTan * lensZoom, 0, 0},
|
||||
{0, 0, -far / frustumHeight, -1},
|
||||
{0, 0, near * far / frustumHeight, 0}
|
||||
};
|
||||
}
|
||||
|
||||
private:
|
||||
std::array<float, Rows*Columns> m_data;
|
||||
std::array<Type, Rows * Columns> m_data;
|
||||
};
|
||||
}
|
||||
@@ -18,7 +18,7 @@ namespace omath
|
||||
// Constructors
|
||||
constexpr Vector2() : x(0.f), y(0.f) {}
|
||||
|
||||
constexpr Vector2(float x, float y) : x(x), y(y) {}
|
||||
constexpr Vector2(const float x, const float y) : x(x), y(y) {}
|
||||
|
||||
// Equality operators
|
||||
[[nodiscard]]
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
#include <cstdint>
|
||||
#include <functional>
|
||||
#include "omath/Vector2.h"
|
||||
#include "omath/Vector2.hpp"
|
||||
|
||||
|
||||
namespace omath
|
||||
@@ -3,7 +3,7 @@
|
||||
//
|
||||
#pragma once
|
||||
|
||||
#include <omath/Vector3.h>
|
||||
#include <omath/Vector3.hpp>
|
||||
#include <algorithm>
|
||||
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
|
||||
#pragma once
|
||||
#include <vector>
|
||||
#include "NavigationMesh.h"
|
||||
#include "omath/Vector3.h"
|
||||
#include "NavigationMesh.hpp"
|
||||
#include "omath/Vector3.hpp"
|
||||
|
||||
|
||||
namespace omath::pathfinding
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "omath/Vector3.h"
|
||||
#include "omath/Vector3.hpp"
|
||||
#include <expected>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
@@ -5,9 +5,9 @@
|
||||
#pragma once
|
||||
|
||||
#include <optional>
|
||||
#include "omath/Vector3.h"
|
||||
#include "omath/prediction/Projectile.h"
|
||||
#include "omath/prediction/Target.h"
|
||||
#include "omath/Vector3.hpp"
|
||||
#include "omath/prediction/Projectile.hpp"
|
||||
#include "omath/prediction/Target.hpp"
|
||||
|
||||
|
||||
namespace omath::prediction
|
||||
@@ -3,7 +3,7 @@
|
||||
//
|
||||
|
||||
#pragma once
|
||||
#include "omath/Vector3.h"
|
||||
#include "omath/Vector3.hpp"
|
||||
|
||||
|
||||
namespace omath::prediction
|
||||
@@ -3,7 +3,7 @@
|
||||
//
|
||||
|
||||
#pragma once
|
||||
#include "omath/Vector3.h"
|
||||
#include "omath/Vector3.hpp"
|
||||
|
||||
|
||||
namespace omath::prediction
|
||||
@@ -5,10 +5,10 @@
|
||||
#pragma once
|
||||
|
||||
#include <expected>
|
||||
#include <omath/Vector3.h>
|
||||
#include <omath/Mat.h>
|
||||
#include <omath/Vector3.hpp>
|
||||
#include <omath/Mat.hpp>
|
||||
#include <string_view>
|
||||
#include "ErrorCodes.h"
|
||||
#include "ErrorCodes.hpp"
|
||||
|
||||
|
||||
namespace omath::projection
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "omath/Matrix.h"
|
||||
#include "omath/Vector3.h"
|
||||
#include "omath/Angles.h"
|
||||
#include "omath/Matrix.hpp"
|
||||
#include "omath/Vector3.hpp"
|
||||
#include "omath/Angles.hpp"
|
||||
|
||||
|
||||
#include <format>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// Created by Vlad on 02.09.2024.
|
||||
//
|
||||
#include "omath/Vector2.h"
|
||||
#include "omath/Vector2.hpp"
|
||||
#include <cmath>
|
||||
|
||||
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
// Created by vlad on 10/28/23.
|
||||
//
|
||||
|
||||
#include <omath/Vector3.h>
|
||||
#include <omath/Vector3.hpp>
|
||||
#include <cmath>
|
||||
#include <omath/Angles.h>
|
||||
#include <omath/Angles.hpp>
|
||||
|
||||
namespace omath
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// Vector4.cpp
|
||||
//
|
||||
|
||||
#include "omath/Vector4.h"
|
||||
#include "omath/Vector4.hpp"
|
||||
#include <cmath>
|
||||
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// Created by vlad on 2/4/24.
|
||||
//
|
||||
|
||||
#include "omath/Color.h"
|
||||
#include "omath/Color.hpp"
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// Created by Vlad on 28.07.2024.
|
||||
//
|
||||
#include "omath/pathfinding/Astar.h"
|
||||
#include "omath/pathfinding/Astar.hpp"
|
||||
|
||||
#include <optional>
|
||||
#include <unordered_map>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// Created by Vlad on 28.07.2024.
|
||||
//
|
||||
#include "omath/pathfinding/NavigationMesh.h"
|
||||
#include "omath/pathfinding/NavigationMesh.hpp"
|
||||
|
||||
#include <stdexcept>
|
||||
#include <algorithm>
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
//
|
||||
|
||||
|
||||
#include "omath/prediction/Engine.h"
|
||||
#include "omath/prediction/Engine.hpp"
|
||||
#include <cmath>
|
||||
#include <omath/Angles.h>
|
||||
#include <omath/Angles.hpp>
|
||||
|
||||
|
||||
namespace omath::prediction
|
||||
@@ -48,10 +48,11 @@ namespace omath::prediction
|
||||
const auto delta = targetPosition - projectile.m_origin;
|
||||
|
||||
const auto distance2d = delta.Length2D();
|
||||
const auto distance2dSqr = distance2d * distance2d;
|
||||
const auto launchSpeedSqr = projectile.m_launchSpeed * projectile.m_launchSpeed;
|
||||
|
||||
|
||||
float root = std::pow(projectile.m_launchSpeed, 4.f) - bulletGravity * (bulletGravity *
|
||||
std::pow(distance2d, 2.f) + 2.0f * delta.z * std::pow(projectile.m_launchSpeed, 2.f));
|
||||
float root = launchSpeedSqr * launchSpeedSqr - bulletGravity * (bulletGravity *
|
||||
distance2dSqr + 2.0f * delta.z * launchSpeedSqr);
|
||||
|
||||
if (root < 0.0f) [[unlikely]]
|
||||
return std::nullopt;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// Created by Vlad on 6/9/2024.
|
||||
//
|
||||
|
||||
#include "omath/prediction/Projectile.h"
|
||||
#include "omath/prediction/Projectile.hpp"
|
||||
#include <cmath>
|
||||
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// Created by Vlad on 6/9/2024.
|
||||
//
|
||||
|
||||
#include "omath/prediction/Target.h"
|
||||
#include "omath/prediction/Target.hpp"
|
||||
|
||||
|
||||
namespace omath::prediction
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
//
|
||||
// Created by Vlad on 27.08.2024.
|
||||
//
|
||||
#include "omath/projection/Camera.h"
|
||||
#include "omath/projection/Camera.hpp"
|
||||
|
||||
#include <complex>
|
||||
|
||||
#include "omath/Angles.h"
|
||||
#include "omath/Angles.hpp"
|
||||
|
||||
|
||||
namespace omath::projection
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// Created by Vlad on 18.08.2024.
|
||||
//
|
||||
#include <gtest/gtest.h>
|
||||
#include <omath/pathfinding/Astar.h>
|
||||
#include <omath/pathfinding/Astar.hpp>
|
||||
|
||||
|
||||
TEST(UnitTestAstar, FindingRightPath)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// Created by Vlad on 01.09.2024.
|
||||
//
|
||||
#include <gtest/gtest.h>
|
||||
#include <omath/Color.h>
|
||||
#include <omath/Color.hpp>
|
||||
|
||||
|
||||
using namespace omath;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// UnitTestMat.cpp
|
||||
#include <gtest/gtest.h>
|
||||
#include "omath/Mat.h"
|
||||
#include "omath/Vector3.h"
|
||||
#include "omath/Mat.hpp"
|
||||
#include "omath/Vector3.hpp"
|
||||
|
||||
using namespace omath;
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
// Created by vlad on 5/18/2024.
|
||||
//
|
||||
#include <gtest/gtest.h>
|
||||
#include <omath/Matrix.h>
|
||||
#include "omath/Vector3.h"
|
||||
#include <omath/Matrix.hpp>
|
||||
#include "omath/Vector3.hpp"
|
||||
|
||||
using namespace omath;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#include <gtest/gtest.h>
|
||||
#include <omath/prediction/Engine.h>
|
||||
#include <omath/prediction/Engine.hpp>
|
||||
|
||||
TEST(UnitTestPrediction, PredictionTest)
|
||||
{
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
//
|
||||
#include <complex>
|
||||
#include <gtest/gtest.h>
|
||||
#include <omath/Matrix.h>
|
||||
#include <omath/Matrix.hpp>
|
||||
#include <print>
|
||||
#include <omath/projection/Camera.h>
|
||||
#include <omath/projection/Camera.hpp>
|
||||
|
||||
TEST(UnitTestProjection, Projection)
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
//
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <omath/Vector2.h>
|
||||
#include <omath/Vector2.hpp>
|
||||
#include <cmath> // For std::isinf and std::isnan
|
||||
#include <cfloat> // For FLT_MAX and FLT_MIN
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
//
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <omath/Vector3.h>
|
||||
#include <omath/Vector3.hpp>
|
||||
#include <cmath>
|
||||
#include <cfloat> // For FLT_MAX, FLT_MIN
|
||||
#include <limits> // For std::numeric_limits
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
//
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <omath/Vector4.h>
|
||||
#include <omath/Vector4.hpp>
|
||||
#include <limits> // For std::numeric_limits
|
||||
|
||||
using namespace omath;
|
||||
|
||||
Reference in New Issue
Block a user