#include #include #include #include #include namespace sf { std::ostream& operator<<(std::ostream& os, const Angle& angle) { os << std::fixed << std::setprecision(std::numeric_limits::max_digits10); return os << angle.asDegrees() << " deg"; } std::ostream& operator<<(std::ostream& os, const String& string) { return os << string.toAnsiString(); } std::ostream& operator<<(std::ostream& os, Time time) { return os << time.asMicroseconds() << "us"; } } // namespace sf bool operator==(const float& lhs, const Approx& rhs) { return static_cast(lhs) == doctest::Approx(static_cast(rhs.value)); } bool operator==(const sf::Vector2f& lhs, const Approx& rhs) { return (lhs - rhs.value).length() == Approx(0.f); } bool operator==(const sf::Vector3f& lhs, const Approx& rhs) { return (lhs - rhs.value).length() == Approx(0.f); } bool operator==(const sf::Angle& lhs, const Approx& rhs) { return lhs.asDegrees() == Approx(rhs.value.asDegrees()); }