From c84b65fa7042906f4148aa9c64878c1e0dab4d9e Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Mon, 5 Sep 2022 01:52:09 +0200 Subject: [PATCH] Remove unnecessary APIs --- .../Shaders/Interop/Helpers/Point64.cs | 8 +------- .../Shaders/Interop/Helpers/Rectangle64.cs | 17 +---------------- 2 files changed, 2 insertions(+), 23 deletions(-) diff --git a/src/ComputeSharp.D2D1/Shaders/Interop/Helpers/Point64.cs b/src/ComputeSharp.D2D1/Shaders/Interop/Helpers/Point64.cs index fb17ee14..17b2a19b 100644 --- a/src/ComputeSharp.D2D1/Shaders/Interop/Helpers/Point64.cs +++ b/src/ComputeSharp.D2D1/Shaders/Interop/Helpers/Point64.cs @@ -8,7 +8,7 @@ namespace ComputeSharp.D2D1.Shaders.Interop.Helpers; /// /// A 64-bit version of the type. /// -internal struct Point64 : IEquatable +internal struct Point64 { /// /// The left coordinate of the current point. @@ -78,10 +78,4 @@ internal struct Point64 : IEquatable this.x = (long)Math.Round(this.x * matrix.M11 + this.y * matrix.M21 + matrix.M31); this.y = (long)Math.Round(this.x * matrix.M12 + this.y * matrix.M22 + matrix.M32); } - - /// - public readonly bool Equals(Point64 other) - { - return this.x == other.x && this.y == other.y; - } } \ No newline at end of file diff --git a/src/ComputeSharp.D2D1/Shaders/Interop/Helpers/Rectangle64.cs b/src/ComputeSharp.D2D1/Shaders/Interop/Helpers/Rectangle64.cs index 375fef1a..26e7da54 100644 --- a/src/ComputeSharp.D2D1/Shaders/Interop/Helpers/Rectangle64.cs +++ b/src/ComputeSharp.D2D1/Shaders/Interop/Helpers/Rectangle64.cs @@ -7,7 +7,7 @@ namespace ComputeSharp.D2D1.Shaders.Interop.Helpers; /// /// A 64-bit version of the type. /// -internal struct Rectangle64 : IEquatable +internal struct Rectangle64 { /// /// The left coordinate of the current rectangle. @@ -80,15 +80,6 @@ internal struct Rectangle64 : IEquatable get => this.y + this.height; } - /// - /// Gets whether the current instance represents an empty rectangle. - /// - public bool IsEmpty - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get => this.x == long.MaxValue && this.y == long.MaxValue && this.width == long.MinValue && this.height == long.MinValue; - } - /// /// Gets a instance representing an empty rectangle. /// @@ -158,12 +149,6 @@ internal struct Rectangle64 : IEquatable return new((int)this.x, (int)this.y, (int)this.width, (int)this.height); } - /// - public readonly bool Equals(Rectangle64 other) - { - return this.x == other.x && this.y == other.y && this.width == other.width && this.height == other.height; - } - /// /// Creates a new instance from an input value. ///