diff --git a/src/DotRecast.Core/ByteBuffer.cs b/src/DotRecast.Core/ByteBuffer.cs index a3caa9c..d17fdef 100644 --- a/src/DotRecast.Core/ByteBuffer.cs +++ b/src/DotRecast.Core/ByteBuffer.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Buffers.Binary; namespace DotRecast.Core @@ -139,4 +139,4 @@ namespace DotRecast.Core // ? } } -} \ No newline at end of file +} diff --git a/src/DotRecast.Core/ConvexUtils.cs b/src/DotRecast.Core/ConvexUtils.cs index e6f63fe..04e1ab6 100644 --- a/src/DotRecast.Core/ConvexUtils.cs +++ b/src/DotRecast.Core/ConvexUtils.cs @@ -67,22 +67,22 @@ namespace DotRecast.Core // Returns true if 'a' is more lower-left than 'b'. private static bool cmppt(Vector3f a, Vector3f b) { - if (a[0] < b[0]) + if (a.x < b.x) { return true; } - if (a[0] > b[0]) + if (a.x > b.x) { return false; } - if (a[2] < b[2]) + if (a.z < b.z) { return true; } - if (a[2] > b[2]) + if (a.z > b.z) { return false; } @@ -93,11 +93,11 @@ namespace DotRecast.Core // Returns true if 'c' is left of line 'a'-'b'. private static bool left(Vector3f a, Vector3f b, Vector3f c) { - float u1 = b[0] - a[0]; - float v1 = b[2] - a[2]; - float u2 = c[0] - a[0]; - float v2 = c[2] - a[2]; + float u1 = b.x - a.x; + float v1 = b.z - a.z; + float u2 = c.x - a.x; + float v2 = c.z - a.z; return u1 * v2 - v1 * u2 < 0; } } -} \ No newline at end of file +} diff --git a/src/DotRecast.Core/Intersections.cs b/src/DotRecast.Core/Intersections.cs index fcf6afb..843cca2 100644 --- a/src/DotRecast.Core/Intersections.cs +++ b/src/DotRecast.Core/Intersections.cs @@ -83,9 +83,9 @@ namespace DotRecast.Core float EPS = 1e-6f; Vector3f d = new Vector3f(); - d.x = sq[0] - sp[0]; - d.y = sq[1] - sp[1]; - d.z = sq[2] - sp[2]; + d.x = sq.x - sp.x; + d.y = sq.y - sp.y; + d.z = sq.z - sp.z; float tmin = 0.0f; float tmax = 1.0f; diff --git a/src/DotRecast.Core/RecastMath.cs b/src/DotRecast.Core/RecastMath.cs index d2e2a12..06f11e7 100644 --- a/src/DotRecast.Core/RecastMath.cs +++ b/src/DotRecast.Core/RecastMath.cs @@ -1003,4 +1003,4 @@ namespace DotRecast.Core return float.IsFinite(v.x) && float.IsFinite(v.z); } } -} \ No newline at end of file +} diff --git a/src/DotRecast.Core/Vector3f.cs b/src/DotRecast.Core/Vector3f.cs index 0a9fdd0..95f592e 100644 --- a/src/DotRecast.Core/Vector3f.cs +++ b/src/DotRecast.Core/Vector3f.cs @@ -100,4 +100,4 @@ namespace DotRecast.Core return !left.Equals(right); } } -} \ No newline at end of file +}