summaryrefslogtreecommitdiff
path: root/modules/mono/glue/Managed
diff options
context:
space:
mode:
authorAaron Franke <arnfranke@yahoo.com>2019-10-02 16:35:49 -0400
committerAaron Franke <arnfranke@yahoo.com>2019-10-14 16:48:59 -0400
commit218f38c7ecdea970a5e82a48e7782077be4fc248 (patch)
tree98c0dc91a6253b678a3cd3dc781b5b4c10044e65 /modules/mono/glue/Managed
parentaeb70756287ad209f0b9d799bcd157dcaed41c17 (diff)
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.
Diffstat (limited to 'modules/mono/glue/Managed')
-rw-r--r--modules/mono/glue/Managed/Files/Color.cs2
-rw-r--r--modules/mono/glue/Managed/Files/Plane.cs2
-rw-r--r--modules/mono/glue/Managed/Files/Quat.cs2
-rw-r--r--modules/mono/glue/Managed/Files/Vector2.cs2
-rw-r--r--modules/mono/glue/Managed/Files/Vector3.cs2
5 files changed, 5 insertions, 5 deletions
diff --git a/modules/mono/glue/Managed/Files/Color.cs b/modules/mono/glue/Managed/Files/Color.cs
index f44634f4e5..df817e47e9 100644
--- a/modules/mono/glue/Managed/Files/Color.cs
+++ b/modules/mono/glue/Managed/Files/Color.cs
@@ -661,7 +661,7 @@ namespace Godot
public bool Equals(Color other)
{
- return Mathf.IsEqualApprox(r, other.r) && Mathf.IsEqualApprox(g, other.g) && Mathf.IsEqualApprox(b, other.b) && Mathf.IsEqualApprox(a, other.a);
+ return r == other.r && g == other.g && b == other.b && a == other.a;
}
public bool IsEqualApprox(Color other)
diff --git a/modules/mono/glue/Managed/Files/Plane.cs b/modules/mono/glue/Managed/Files/Plane.cs
index e7ad68ab49..4e59632a47 100644
--- a/modules/mono/glue/Managed/Files/Plane.cs
+++ b/modules/mono/glue/Managed/Files/Plane.cs
@@ -203,7 +203,7 @@ namespace Godot
public bool Equals(Plane other)
{
- return _normal == other._normal && Mathf.IsEqualApprox(D, other.D);
+ return _normal == other._normal && D == other.D;
}
public bool IsEqualApprox(Plane other)
diff --git a/modules/mono/glue/Managed/Files/Quat.cs b/modules/mono/glue/Managed/Files/Quat.cs
index 52f0305b16..8f60867ac3 100644
--- a/modules/mono/glue/Managed/Files/Quat.cs
+++ b/modules/mono/glue/Managed/Files/Quat.cs
@@ -363,7 +363,7 @@ namespace Godot
public bool Equals(Quat other)
{
- return Mathf.IsEqualApprox(x, other.x) && Mathf.IsEqualApprox(y, other.y) && Mathf.IsEqualApprox(z, other.z) && Mathf.IsEqualApprox(w, other.w);
+ return x == other.x && y == other.y && z == other.z && w == other.w;
}
public bool IsEqualApprox(Quat other)
diff --git a/modules/mono/glue/Managed/Files/Vector2.cs b/modules/mono/glue/Managed/Files/Vector2.cs
index 70d6cd382a..f92453f546 100644
--- a/modules/mono/glue/Managed/Files/Vector2.cs
+++ b/modules/mono/glue/Managed/Files/Vector2.cs
@@ -455,7 +455,7 @@ namespace Godot
public bool Equals(Vector2 other)
{
- return Mathf.IsEqualApprox(x, other.x) && Mathf.IsEqualApprox(y, other.y);
+ return x == other.x && y == other.y;
}
public bool IsEqualApprox(Vector2 other)
diff --git a/modules/mono/glue/Managed/Files/Vector3.cs b/modules/mono/glue/Managed/Files/Vector3.cs
index 7b1080c266..025b09199f 100644
--- a/modules/mono/glue/Managed/Files/Vector3.cs
+++ b/modules/mono/glue/Managed/Files/Vector3.cs
@@ -513,7 +513,7 @@ namespace Godot
public bool Equals(Vector3 other)
{
- return Mathf.IsEqualApprox(x, other.x) && Mathf.IsEqualApprox(y, other.y) && Mathf.IsEqualApprox(z, other.z);
+ return x == other.x && y == other.y && z == other.z;
}
public bool IsEqualApprox(Vector3 other)