mirror of
https://github.com/orange-cpp/omath.git
synced 2026-02-13 07:03:25 +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:
@@ -13,7 +13,7 @@ TEST(UnitTestProjection, Projection)
|
||||
const auto cam = omath::source_engine::Camera({0, 0, 0}, omath::source_engine::ViewAngles{}, {1920.f, 1080.f}, fov,
|
||||
0.01f, 1000.f);
|
||||
|
||||
const auto projected = cam.world_to_screen({1000, 0, 50.f});
|
||||
const auto projected = cam.world_to_screen({1000.f, 0, 50.f});
|
||||
const auto result = cam.screen_to_world(projected.value());
|
||||
const auto result2 = cam.world_to_screen(result.value());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user