diff --git a/libs/math/include/psemek/math/trs.hpp b/libs/math/include/psemek/math/trs.hpp index 2e9eb273..f61ed1bb 100644 --- a/libs/math/include/psemek/math/trs.hpp +++ b/libs/math/include/psemek/math/trs.hpp @@ -4,6 +4,8 @@ #include #include +#include + namespace psemek::math { @@ -86,3 +88,24 @@ namespace psemek::math }; } + +namespace std +{ + + template + struct formatter<::psemek::math::trs, Char> + { + template + constexpr auto parse(FormatContext & ctx) const + { + return ctx.begin(); + } + + template + auto format(::psemek::math::trs const & trs, FormatContext & ctx) const + { + return std::format_to(ctx.out(), "translation: {}\nrotation: {}\nscale: {}", trs.translation, trs.rotation, trs.scale); + } + }; + +}