aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/api/Vector2.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/crepe/api/Vector2.hpp')
-rw-r--r--src/crepe/api/Vector2.hpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/crepe/api/Vector2.hpp b/src/crepe/api/Vector2.hpp
index 5709f46..e2f96ed 100644
--- a/src/crepe/api/Vector2.hpp
+++ b/src/crepe/api/Vector2.hpp
@@ -178,3 +178,9 @@ Vector2<T> Vector2<T>::rotate(float deg) const {
}
} // namespace crepe
+
+template <typename T>
+std::format_context::iterator std::formatter<crepe::Vector2<T>>::format(crepe::Vector2<T> vec, format_context & ctx) const {
+ return formatter<string>::format(std::format("{{{}, {}}}", vec.x, vec.y), ctx);
+}
+