diff --git a/include/omath/engines/cry_engine/traits/camera_trait.hpp b/include/omath/engines/cry_engine/traits/camera_trait.hpp index ebcb965..819edcf 100644 --- a/include/omath/engines/cry_engine/traits/camera_trait.hpp +++ b/include/omath/engines/cry_engine/traits/camera_trait.hpp @@ -4,7 +4,6 @@ #pragma once #include "omath/engines/cry_engine/formulas.hpp" -#include "omath/internal/constexpr_math.hpp" #include "omath/projection/camera.hpp" namespace omath::cry_engine { @@ -16,8 +15,8 @@ namespace omath::cry_engine const Vector3& look_at) noexcept { const auto direction = (look_at - cam_origin).normalized(); - return {PitchAngle::from_radians(internal::asin(direction.z)), - YawAngle::from_radians(-internal::atan2(direction.x, direction.y)), RollAngle::from_radians(0.f)}; + return {PitchAngle::from_asin(direction.z), -YawAngle::from_atan2(direction.x, direction.y), + RollAngle::from_radians(0.f)}; } [[nodiscard("view matrix result should not be discarded")]] diff --git a/include/omath/engines/frostbite_engine/traits/camera_trait.hpp b/include/omath/engines/frostbite_engine/traits/camera_trait.hpp index 9adaeed..b6c5d26 100644 --- a/include/omath/engines/frostbite_engine/traits/camera_trait.hpp +++ b/include/omath/engines/frostbite_engine/traits/camera_trait.hpp @@ -4,7 +4,6 @@ #pragma once #include "omath/engines/frostbite_engine/formulas.hpp" -#include "omath/internal/constexpr_math.hpp" #include "omath/projection/camera.hpp" namespace omath::frostbite_engine @@ -18,8 +17,8 @@ namespace omath::frostbite_engine { const auto direction = (look_at - cam_origin).normalized(); - return {PitchAngle::from_radians(-internal::asin(direction.y)), - YawAngle::from_radians(internal::atan2(direction.x, direction.z)), RollAngle::from_radians(0.f)}; + return {-PitchAngle::from_asin(direction.y), YawAngle::from_atan2(direction.x, direction.z), + RollAngle::from_radians(0.f)}; } [[nodiscard("view matrix result should not be discarded")]] diff --git a/include/omath/engines/iw_engine/traits/camera_trait.hpp b/include/omath/engines/iw_engine/traits/camera_trait.hpp index dec6bd4..a105c22 100644 --- a/include/omath/engines/iw_engine/traits/camera_trait.hpp +++ b/include/omath/engines/iw_engine/traits/camera_trait.hpp @@ -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")]] diff --git a/include/omath/engines/opengl_engine/traits/camera_trait.hpp b/include/omath/engines/opengl_engine/traits/camera_trait.hpp index 027d887..d86797d 100644 --- a/include/omath/engines/opengl_engine/traits/camera_trait.hpp +++ b/include/omath/engines/opengl_engine/traits/camera_trait.hpp @@ -4,7 +4,6 @@ #pragma once #include "omath/engines/opengl_engine/formulas.hpp" -#include "omath/internal/constexpr_math.hpp" #include "omath/projection/camera.hpp" namespace omath::opengl_engine @@ -18,8 +17,8 @@ namespace omath::opengl_engine { const auto direction = (look_at - cam_origin).normalized(); - return {PitchAngle::from_radians(internal::asin(direction.y)), - YawAngle::from_radians(-internal::atan2(direction.x, -direction.z)), RollAngle::from_radians(0.f)}; + return {PitchAngle::from_asin(direction.y), -YawAngle::from_atan2(direction.x, -direction.z), + RollAngle::from_radians(0.f)}; } [[nodiscard("view matrix result should not be discarded")]] diff --git a/include/omath/engines/rage_engine/traits/camera_trait.hpp b/include/omath/engines/rage_engine/traits/camera_trait.hpp index 38341ab..59a4605 100644 --- a/include/omath/engines/rage_engine/traits/camera_trait.hpp +++ b/include/omath/engines/rage_engine/traits/camera_trait.hpp @@ -4,7 +4,6 @@ #pragma once #include "omath/engines/rage_engine/formulas.hpp" -#include "omath/internal/constexpr_math.hpp" #include "omath/projection/camera.hpp" namespace omath::rage_engine @@ -18,8 +17,8 @@ namespace omath::rage_engine { const auto direction = (look_at - cam_origin).normalized(); - return {PitchAngle::from_radians(internal::asin(direction.z)), - YawAngle::from_radians(-internal::atan2(direction.x, direction.y)), RollAngle::from_radians(0.f)}; + return {PitchAngle::from_asin(direction.z), -YawAngle::from_atan2(direction.x, direction.y), + RollAngle::from_radians(0.f)}; } [[nodiscard("view matrix result should not be discarded")]] diff --git a/include/omath/engines/source_engine/traits/camera_trait.hpp b/include/omath/engines/source_engine/traits/camera_trait.hpp index 8fe501b..20b9f35 100644 --- a/include/omath/engines/source_engine/traits/camera_trait.hpp +++ b/include/omath/engines/source_engine/traits/camera_trait.hpp @@ -4,7 +4,6 @@ #pragma once #include "omath/engines/source_engine/formulas.hpp" -#include "omath/internal/constexpr_math.hpp" #include "omath/projection/camera.hpp" namespace omath::source_engine @@ -18,8 +17,8 @@ namespace omath::source_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")]] diff --git a/include/omath/engines/unity_engine/traits/camera_trait.hpp b/include/omath/engines/unity_engine/traits/camera_trait.hpp index eeddfad..8f7bb9a 100644 --- a/include/omath/engines/unity_engine/traits/camera_trait.hpp +++ b/include/omath/engines/unity_engine/traits/camera_trait.hpp @@ -4,7 +4,6 @@ #pragma once #include "omath/engines/unity_engine/formulas.hpp" -#include "omath/internal/constexpr_math.hpp" #include "omath/projection/camera.hpp" namespace omath::unity_engine @@ -18,8 +17,8 @@ namespace omath::unity_engine { const auto direction = (look_at - cam_origin).normalized(); - return {PitchAngle::from_radians(-internal::asin(direction.y)), - YawAngle::from_radians(internal::atan2(direction.x, direction.z)), RollAngle::from_radians(0.f)}; + return {-PitchAngle::from_asin(direction.y), YawAngle::from_atan2(direction.x, direction.z), + RollAngle::from_radians(0.f)}; } [[nodiscard("view matrix result should not be discarded")]] diff --git a/include/omath/engines/unreal_engine/traits/camera_trait.hpp b/include/omath/engines/unreal_engine/traits/camera_trait.hpp index 1b4a862..3ad55d6 100644 --- a/include/omath/engines/unreal_engine/traits/camera_trait.hpp +++ b/include/omath/engines/unreal_engine/traits/camera_trait.hpp @@ -4,7 +4,6 @@ #pragma once #include "omath/engines/unreal_engine/formulas.hpp" -#include "omath/internal/constexpr_math.hpp" #include "omath/projection/camera.hpp" namespace omath::unreal_engine @@ -18,8 +17,8 @@ namespace omath::unreal_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")]]