mirror of
https://github.com/orange-cpp/omath.git
synced 2026-02-13 07:03:25 +00:00
fixed gimba lock for unity
This commit is contained in:
@@ -294,7 +294,7 @@ namespace omath
|
|||||||
[[nodiscard]]
|
[[nodiscard]]
|
||||||
constexpr std::array<Type, Rows * Columns>& RawArray()
|
constexpr std::array<Type, Rows * Columns>& RawArray()
|
||||||
{
|
{
|
||||||
return const_cast<std::array<Type, Rows * Columns>>(std::as_const(*this).RawArray());
|
return m_data;
|
||||||
}
|
}
|
||||||
|
|
||||||
[[nodiscard]]
|
[[nodiscard]]
|
||||||
|
|||||||
@@ -32,9 +32,9 @@ namespace omath::unity_engine
|
|||||||
}
|
}
|
||||||
Mat4x4 RotationMatrix(const ViewAngles& angles)
|
Mat4x4 RotationMatrix(const ViewAngles& angles)
|
||||||
{
|
{
|
||||||
return MatRotationAxisZ(angles.roll) *
|
return MatRotationAxisX<float, MatStoreType::ROW_MAJOR>(angles.pitch) *
|
||||||
MatRotationAxisY(angles.yaw) *
|
MatRotationAxisY<float, MatStoreType::ROW_MAJOR>(angles.yaw) *
|
||||||
MatRotationAxisX(angles.pitch);
|
MatRotationAxisZ<float, MatStoreType::ROW_MAJOR>(angles.roll);
|
||||||
}
|
}
|
||||||
Mat4x4 CalcPerspectiveProjectionMatrix(const float fieldOfView, const float aspectRatio, const float near,
|
Mat4x4 CalcPerspectiveProjectionMatrix(const float fieldOfView, const float aspectRatio, const float near,
|
||||||
const float far)
|
const float far)
|
||||||
|
|||||||
Reference in New Issue
Block a user