Compare commits

..

2 Commits

Author SHA1 Message Date
29795e9906 Includes missing formula headers
Includes the necessary formula headers in the camera trait files for different rendering engines.
This ensures that the required mathematical functions and definitions are available when using camera traits.
2025-08-12 19:08:30 +03:00
0328fef4f7 Fixes Vector3 conversion from ImVec2
Corrects the static function signature for creating a Vector3 from an ImVec2.

It was mistakenly returning a Vector3 instead of Vector3.

patch
2025-08-12 09:38:43 +03:00
5 changed files with 4 additions and 5 deletions

View File

@@ -226,7 +226,7 @@ namespace omath
return {static_cast<float>(this->x), static_cast<float>(this->y)};
}
[[nodiscard]]
static Vector3<float> from_im_vec2(const ImVec2& other) noexcept
static Vector2 from_im_vec2(const ImVec2& other) noexcept
{
return {static_cast<Type>(other.x), static_cast<Type>(other.y)};
}

View File

@@ -198,7 +198,6 @@ namespace omath
{
return {static_cast<Type>(other.x), static_cast<Type>(other.y), static_cast<Type>(other.z)};
}
}
#endif
};
} // namespace omath

View File

@@ -2,7 +2,7 @@
// Created by Vlad on 8/11/2025.
//
#include "omath/engines/iw_engine/traits/camera_trait.hpp"
#include "omath/engines/iw_engine/formulas.hpp"
namespace omath::iw_engine
{

View File

@@ -2,7 +2,7 @@
// Created by Vlad on 8/11/2025.
//
#include "omath/engines/opengl_engine/traits/camera_trait.hpp"
#include "omath/engines/opengl_engine/formulas.hpp"
namespace omath::opengl_engine
{

View File

@@ -2,7 +2,7 @@
// Created by Vlad on 8/11/2025.
//
#include "omath/engines/source_engine/traits/camera_trait.hpp"
#include "omath/engines/source_engine/formulas.hpp"
namespace omath::source_engine
{