specify std::round

This commit is contained in:
2025-05-02 16:30:07 -05:00
parent cf5ce53721
commit 96beb0d4b1

View File

@@ -13,6 +13,7 @@
#include <tuple>
#include <vector>
#include <string>
#include <cmath>
#include <SFML/Graphics/Color.hpp>
#include <SFML/Graphics/Text.hpp>
@@ -71,8 +72,8 @@ void win_draw_string(sf::RenderTarget& dest_window,rectangle dest_rect,std::stri
break_info_t calculate_line_wrapping(rectangle dest_rect, std::string str, TextStyle style);
size_t string_length(std::string str, const TextStyle& style, short* height = nullptr);
inline void round_vec(sf::Vector2f& vec) {
vec.x = round(vec.x);
vec.y = round(vec.y);
vec.x = std::round(vec.x);
vec.y = std::round(vec.y);
}
#endif