mirror of
https://github.com/orange-cpp/omath.git
synced 2026-08-07 21:42:05 +00:00
code style fix
This commit is contained in:
@@ -12,15 +12,14 @@ namespace omath::algorithm
|
||||
[[nodiscard]]
|
||||
Vector2<float> world_to_radar(const Camera& camera, const Vector3<FloatingType>& 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;
|
||||
}();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user