Changed to row-major matrices repr

This commit is contained in:
Vladyslav Baranovskyi
2025-02-12 21:46:23 +02:00
parent aeb003fb52
commit 9eaecd7982

View File

@@ -102,8 +102,8 @@ struct fmt::formatter<glm::mat<2, 2, T, Q>>
auto format(const glm::mat<2, 2, T, Q>& m, FormatContext& ctx) const auto format(const glm::mat<2, 2, T, Q>& m, FormatContext& ctx) const
{ {
return fmt::format_to(ctx.out(), "[[{}, {}], [{}, {}]]", return fmt::format_to(ctx.out(), "[[{}, {}], [{}, {}]]",
m[0][0], m[0][1], m[0][0], m[1][0],
m[1][0], m[1][1]); m[0][1], m[1][1]);
} }
}; };
@@ -119,9 +119,9 @@ struct fmt::formatter<glm::mat<3, 3, T, Q>>
auto format(const glm::mat<3, 3, T, Q>& m, FormatContext& ctx) const auto format(const glm::mat<3, 3, T, Q>& m, FormatContext& ctx) const
{ {
return fmt::format_to(ctx.out(), "[[{}, {}, {}], [{}, {}, {}], [{}, {}, {}]]", return fmt::format_to(ctx.out(), "[[{}, {}, {}], [{}, {}, {}], [{}, {}, {}]]",
m[0][0], m[0][1], m[0][2], m[0][0], m[1][0], m[2][0],
m[1][0], m[1][1], m[1][2], m[0][1], m[1][1], m[2][1],
m[2][0], m[2][1], m[2][2]); m[0][2], m[1][2], m[2][2]);
} }
}; };
@@ -137,10 +137,10 @@ struct fmt::formatter<glm::mat<4, 4, T, Q>>
auto format(const glm::mat<4, 4, T, Q>& m, FormatContext& ctx) const auto format(const glm::mat<4, 4, T, Q>& m, FormatContext& ctx) const
{ {
return fmt::format_to(ctx.out(), "[[{}, {}, {}, {}], [{}, {}, {}, {}], [{}, {}, {}, {}], [{}, {}, {}, {}]]", return fmt::format_to(ctx.out(), "[[{}, {}, {}, {}], [{}, {}, {}, {}], [{}, {}, {}, {}], [{}, {}, {}, {}]]",
m[0][0], m[0][1], m[0][2], m[0][3], m[0][0], m[1][0], m[2][0], m[3][0],
m[1][0], m[1][1], m[1][2], m[1][3], m[0][1], m[1][1], m[2][1], m[3][1],
m[2][0], m[2][1], m[2][2], m[2][3], m[0][2], m[1][2], m[2][2], m[3][2],
m[3][0], m[3][1], m[3][2], m[3][3]); m[0][3], m[1][3], m[2][3], m[3][3]);
} }
}; };