1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Several fixes to make GLES2 on HTML5 work much better.

Changed math class error reporting to be a bit less paranoid.
This commit is contained in:
Juan Linietsky
2019-02-25 21:46:24 -03:00
parent 51c1d55cf9
commit a32b26dfa2
16 changed files with 315 additions and 100 deletions

View File

@@ -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 {