Expose is_equal_approx and restore == to be exact again

This commit changes behavior for GDScript and C#.

Also did some organizing of the order to logically group related methods, mostly for Rect2 and AABB.
This commit is contained in:
Aaron Franke
2019-10-02 16:35:49 -04:00
parent aeb7075628
commit 218f38c7ec
9 changed files with 65 additions and 46 deletions

View File

@ -125,12 +125,12 @@ Plane::Plane(const Vector3 &p_point1, const Vector3 &p_point2, const Vector3 &p_
bool Plane::operator==(const Plane &p_plane) const {
return normal == p_plane.normal && Math::is_equal_approx(d, p_plane.d);
return normal == p_plane.normal && d == p_plane.d;
}
bool Plane::operator!=(const Plane &p_plane) const {
return normal != p_plane.normal || !Math::is_equal_approx(d, p_plane.d);
return normal != p_plane.normal || d != p_plane.d;
}
#endif // PLANE_H