From a32b26dfa26f2a039bf9c84b90d10666bcf785c9 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Mon, 25 Feb 2019 21:46:24 -0300 Subject: Several fixes to make GLES2 on HTML5 work much better. Changed math class error reporting to be a bit less paranoid. --- core/math/vector2.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/math/vector2.cpp') diff --git a/core/math/vector2.cpp b/core/math/vector2.cpp index e580057950..5c1ea5943d 100644 --- a/core/math/vector2.cpp +++ b/core/math/vector2.cpp @@ -65,7 +65,7 @@ Vector2 Vector2::normalized() const { bool Vector2::is_normalized() const { // use length_squared() instead of length() to avoid sqrt(), makes it more stringent. - return Math::is_equal_approx(length_squared(), 1.0); + return Math::is_equal_approx(length_squared(), 1.0, UNIT_EPSILON); } real_t Vector2::distance_to(const Vector2 &p_vector2) const { -- cgit v1.2.3