specify std::round
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user