diff --git a/include/omath/algorithm/radar.hpp b/include/omath/algorithm/radar.hpp index 7c4e049..4f27d47 100644 --- a/include/omath/algorithm/radar.hpp +++ b/include/omath/algorithm/radar.hpp @@ -12,15 +12,14 @@ namespace omath::algorithm [[nodiscard]] Vector2 world_to_radar(const Camera& camera, const Vector3& position, const FloatingType scale) { - const auto look_at_angles = camera.calc_look_at_angles(position); const auto current_angles = camera.get_view_angles(); static const auto sign = [&camera, ¤t_angles] { auto right_yaw = current_angles.yaw - - camera.calc_look_at_angles(camera.get_origin() + camera.get_abs_right()).yaw - - decltype(current_angles.yaw)::from_degrees(90); + - camera.calc_look_at_angles(camera.get_origin() + camera.get_abs_right()).yaw + - decltype(current_angles.yaw)::from_degrees(90); return right_yaw.cos() < 0 ? -1.f : 1.f; }();