improvement

This commit is contained in:
2026-07-20 01:00:50 +03:00
parent ecc9852cd8
commit ac57e8da9e
8 changed files with 16 additions and 24 deletions
@@ -4,7 +4,6 @@
#pragma once
#include "omath/engines/iw_engine/formulas.hpp"
#include "omath/internal/constexpr_math.hpp"
#include "omath/projection/camera.hpp"
namespace omath::iw_engine
@@ -18,8 +17,8 @@ namespace omath::iw_engine
{
const auto direction = (look_at - cam_origin).normalized();
return {PitchAngle::from_radians(-internal::asin(direction.z)),
YawAngle::from_radians(internal::atan2(direction.y, direction.x)), RollAngle::from_radians(0.f)};
return {-PitchAngle::from_asin(direction.z), YawAngle::from_atan2(direction.y, direction.x),
RollAngle::from_radians(0.f)};
}
[[nodiscard("view matrix result should not be discarded")]]