Increase precision of operator<<(Vector2<T>)

This commit is contained in:
Chris Thrasher 2022-04-30 23:20:46 -06:00 committed by Lukas Dürrenberger
parent 88515b2fca
commit 049e3ce8f2

View File

@ -9,6 +9,7 @@
#include <SFML/System/Vector2.hpp> #include <SFML/System/Vector2.hpp>
#include <SFML/System/Vector3.hpp> #include <SFML/System/Vector3.hpp>
#include <iomanip>
#include <ostream> #include <ostream>
#include <sstream> #include <sstream>
#include <string> #include <string>
@ -27,6 +28,7 @@ namespace sf
template <typename T> template <typename T>
std::ostream& operator <<(std::ostream& os, const sf::Vector2<T>& vector) std::ostream& operator <<(std::ostream& os, const sf::Vector2<T>& vector)
{ {
os << std::fixed << std::setprecision(std::numeric_limits<T>::max_digits10);
os << "(" << vector.x << ", " << vector.y << ")"; os << "(" << vector.x << ", " << vector.y << ")";
return os; return os;
} }