reparation dash plus supression des warning

This commit is contained in:
Estrela Allan p1923381
2020-05-04 15:02:08 +02:00
parent dfe4bd0ae5
commit 6d4576bf8c
4 changed files with 25 additions and 12 deletions

View File

@ -214,8 +214,8 @@ struct Vector2 {
inline Vector2 snapped(const Vector2 &p_by) const {
return Vector2(
p_by.x != 0 ? ::floor(x / p_by.x + 0.5) * p_by.x : x,
p_by.y != 0 ? ::floor(y / p_by.y + 0.5) * p_by.y : y);
p_by.x != 0.0f ? ::floor(x / p_by.x + 0.5f) * p_by.x : x,
p_by.y != 0.0f ? ::floor(y / p_by.y + 0.5f) * p_by.y : y);
}
inline real_t aspect() const { return width / height; }