mirror of
https://github.com/orange-cpp/omath.git
synced 2026-02-13 15:03:27 +00:00
Fixes float type conversion in world_to_screen
Fixes a potential type conversion issue by explicitly casting the x-coordinate to float in the world_to_screen test. This prevents possible compiler warnings and ensures the intended behavior.
This commit is contained in:
@@ -10,9 +10,12 @@
|
||||
#include <expected>
|
||||
#include <omath/angle.hpp>
|
||||
#include <type_traits>
|
||||
|
||||
#ifdef OMATH_BUILD_TESTS
|
||||
// ReSharper disable once CppInconsistentNaming
|
||||
class UnitTestProjection_Projection_Test;
|
||||
#endif
|
||||
|
||||
namespace omath::projection
|
||||
{
|
||||
class ViewPort final
|
||||
@@ -47,8 +50,9 @@ namespace omath::projection
|
||||
requires CameraEngineConcept<TraitClass, Mat4X4Type, ViewAnglesType>
|
||||
class Camera final
|
||||
{
|
||||
#ifdef OMATH_BUILD_TESTS
|
||||
friend UnitTestProjection_Projection_Test;
|
||||
|
||||
#endif
|
||||
public:
|
||||
~Camera() = default;
|
||||
Camera(const Vector3<float>& position, const ViewAnglesType& view_angles, const ViewPort& view_port,
|
||||
|
||||
Reference in New Issue
Block a user