From 035658cdbe01f9d55e2d018e33f7f62bbe35103b Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Thu, 29 Aug 2019 02:13:56 +0200 Subject: [PATCH] Fixed accessors for static properties of vector types --- src/ComputeSharp.Core/Primitives/Bool/Bool2.cs | 8 ++++---- src/ComputeSharp.Core/Primitives/Double/Double2.cs | 8 ++++---- src/ComputeSharp.Core/Primitives/Double/Double3.cs | 10 +++++----- src/ComputeSharp.Core/Primitives/Double/Double4.cs | 12 ++++++------ src/ComputeSharp.Core/Primitives/Float/Float2.cs | 8 ++++---- src/ComputeSharp.Core/Primitives/Float/Float3.cs | 10 +++++----- src/ComputeSharp.Core/Primitives/Float/Float4.cs | 12 ++++++------ src/ComputeSharp.Core/Primitives/Int/Int2.cs | 8 ++++---- src/ComputeSharp.Core/Primitives/Int/Int3.cs | 10 +++++----- src/ComputeSharp.Core/Primitives/Int/Int4.cs | 12 ++++++------ src/ComputeSharp.Core/Primitives/UInt/UInt2.cs | 8 ++++---- src/ComputeSharp.Core/Primitives/UInt/UInt3.cs | 10 +++++----- src/ComputeSharp.Core/Primitives/UInt/UInt4.cs | 12 ++++++------ 13 files changed, 64 insertions(+), 64 deletions(-) diff --git a/src/ComputeSharp.Core/Primitives/Bool/Bool2.cs b/src/ComputeSharp.Core/Primitives/Bool/Bool2.cs index 2675b97d..1ae24b10 100644 --- a/src/ComputeSharp.Core/Primitives/Bool/Bool2.cs +++ b/src/ComputeSharp.Core/Primitives/Bool/Bool2.cs @@ -12,22 +12,22 @@ namespace ComputeSharp /// /// Gets an value with all components set to /// - public static Bool2 False { get; } = new Bool2(false, false); + public static Bool2 False => new Bool2(false, false); /// /// Gets an value with all components set to /// - public static Bool2 True { get; } = new Bool2(true, true); + public static Bool2 True => new Bool2(true, true); /// /// Gets an value with the component set to , and the others to /// - public static Bool2 TrueX { get; } = new Bool2(true, false); + public static Bool2 TrueX => new Bool2(true, false); /// /// Gets an value with the component set to , and the others to /// - public static Bool2 TrueY { get; } = new Bool2(false, true); + public static Bool2 TrueY => new Bool2(false, true); /// /// Creates a new instance with the specified parameters diff --git a/src/ComputeSharp.Core/Primitives/Double/Double2.cs b/src/ComputeSharp.Core/Primitives/Double/Double2.cs index 35a1d57c..8d8d6ff0 100644 --- a/src/ComputeSharp.Core/Primitives/Double/Double2.cs +++ b/src/ComputeSharp.Core/Primitives/Double/Double2.cs @@ -12,22 +12,22 @@ namespace ComputeSharp /// /// Gets an value with all components set to 0 /// - public static Double2 Zero { get; } = 0; + public static Double2 Zero => 0; /// /// Gets an value with all components set to 1 /// - public static Double2 One { get; } = 1; + public static Double2 One => 1; /// /// Gets an value with the component set to 1, and the others to 0 /// - public static Double2 UnitX { get; } = new Double2(1, 0); + public static Double2 UnitX => new Double2(1, 0); /// /// Gets an value with the component set to 1, and the others to 0 /// - public static Double2 UnitY { get; } = new Double2(0, 1); + public static Double2 UnitY => new Double2(0, 1); /// /// Creates a new instance with the specified parameters diff --git a/src/ComputeSharp.Core/Primitives/Double/Double3.cs b/src/ComputeSharp.Core/Primitives/Double/Double3.cs index 76aaeec1..7c155187 100644 --- a/src/ComputeSharp.Core/Primitives/Double/Double3.cs +++ b/src/ComputeSharp.Core/Primitives/Double/Double3.cs @@ -12,27 +12,27 @@ namespace ComputeSharp /// /// Gets an value with all components set to 0 /// - public static Double3 Zero { get; } = 0; + public static Double3 Zero => 0; /// /// Gets an value with all components set to 1 /// - public static Double3 One { get; } = 1; + public static Double3 One => 1; /// /// Gets an value with the component set to 1, and the others to 0 /// - public static Double3 UnitX { get; } = new Double3(1, 0, 0); + public static Double3 UnitX => new Double3(1, 0, 0); /// /// Gets an value with the component set to 1, and the others to 0 /// - public static Double3 UnitY { get; } = new Double3(0, 1, 0); + public static Double3 UnitY => new Double3(0, 1, 0); /// /// Gets an value with the component set to 1, and the others to 0 /// - public static Double3 UnitZ { get; } = new Double3(0, 0, 1); + public static Double3 UnitZ => new Double3(0, 0, 1); /// /// Creates a new instance with the specified parameters diff --git a/src/ComputeSharp.Core/Primitives/Double/Double4.cs b/src/ComputeSharp.Core/Primitives/Double/Double4.cs index 3752bb30..b2d3209e 100644 --- a/src/ComputeSharp.Core/Primitives/Double/Double4.cs +++ b/src/ComputeSharp.Core/Primitives/Double/Double4.cs @@ -12,32 +12,32 @@ namespace ComputeSharp /// /// Gets an value with all components set to 0 /// - public static Double4 Zero { get; } = 0; + public static Double4 Zero => 0; /// /// Gets an value with all components set to 1 /// - public static Double4 One { get; } = 1; + public static Double4 One => 1; /// /// Gets an value with the component set to 1, and the others to 0 /// - public static Double4 UnitX { get; } = new Double4(1, 0, 0, 0); + public static Double4 UnitX => new Double4(1, 0, 0, 0); /// /// Gets an value with the component set to 1, and the others to 0 /// - public static Double4 UnitY { get; } = new Double4(0, 1, 0, 0); + public static Double4 UnitY => new Double4(0, 1, 0, 0); /// /// Gets an value with the component set to 1, and the others to 0 /// - public static Double4 UnitZ { get; } = new Double4(0, 0, 1, 0); + public static Double4 UnitZ => new Double4(0, 0, 1, 0); /// /// Gets an value with the component set to 1, and the others to 0 /// - public static Double4 UnitW { get; } = new Double4(0, 0, 0, 1); + public static Double4 UnitW => new Double4(0, 0, 0, 1); /// /// Creates a new instance with the specified parameters diff --git a/src/ComputeSharp.Core/Primitives/Float/Float2.cs b/src/ComputeSharp.Core/Primitives/Float/Float2.cs index 78f50b58..35dcfd93 100644 --- a/src/ComputeSharp.Core/Primitives/Float/Float2.cs +++ b/src/ComputeSharp.Core/Primitives/Float/Float2.cs @@ -12,22 +12,22 @@ namespace ComputeSharp /// /// Gets an value with all components set to 0 /// - public static Float2 Zero { get; } = 0; + public static Float2 Zero => 0; /// /// Gets an value with all components set to 1 /// - public static Float2 One { get; } = 1; + public static Float2 One => 1; /// /// Gets an value with the component set to 1, and the others to 0 /// - public static Float2 UnitX { get; } = new Float2(1, 0); + public static Float2 UnitX => new Float2(1, 0); /// /// Gets an value with the component set to 1, and the others to 0 /// - public static Float2 UnitY { get; } = new Float2(0, 1); + public static Float2 UnitY => new Float2(0, 1); /// /// Creates a new instance with the specified parameters diff --git a/src/ComputeSharp.Core/Primitives/Float/Float3.cs b/src/ComputeSharp.Core/Primitives/Float/Float3.cs index 53d5a57a..da7962fe 100644 --- a/src/ComputeSharp.Core/Primitives/Float/Float3.cs +++ b/src/ComputeSharp.Core/Primitives/Float/Float3.cs @@ -12,27 +12,27 @@ namespace ComputeSharp /// /// Gets an value with all components set to 0 /// - public static Float3 Zero { get; } = 0; + public static Float3 Zero => 0; /// /// Gets an value with all components set to 1 /// - public static Float3 One { get; } = 1; + public static Float3 One => 1; /// /// Gets an value with the component set to 1, and the others to 0 /// - public static Float3 UnitX { get; } = new Float3(1, 0, 0); + public static Float3 UnitX => new Float3(1, 0, 0); /// /// Gets an value with the component set to 1, and the others to 0 /// - public static Float3 UnitY { get; } = new Float3(0, 1, 0); + public static Float3 UnitY => new Float3(0, 1, 0); /// /// Gets an value with the component set to 1, and the others to 0 /// - public static Float3 UnitZ { get; } = new Float3(0, 0, 1); + public static Float3 UnitZ => new Float3(0, 0, 1); /// /// Creates a new instance with the specified parameters diff --git a/src/ComputeSharp.Core/Primitives/Float/Float4.cs b/src/ComputeSharp.Core/Primitives/Float/Float4.cs index 758a95e1..963071c7 100644 --- a/src/ComputeSharp.Core/Primitives/Float/Float4.cs +++ b/src/ComputeSharp.Core/Primitives/Float/Float4.cs @@ -12,32 +12,32 @@ namespace ComputeSharp /// /// Gets an value with all components set to 0 /// - public static Float4 Zero { get; } = 0; + public static Float4 Zero => 0; /// /// Gets an value with all components set to 1 /// - public static Float4 One { get; } = 1; + public static Float4 One => 1; /// /// Gets an value with the component set to 1, and the others to 0 /// - public static Float4 UnitX { get; } = new Float4(1, 0, 0, 0); + public static Float4 UnitX => new Float4(1, 0, 0, 0); /// /// Gets an value with the component set to 1, and the others to 0 /// - public static Float4 UnitY { get; } = new Float4(0, 1, 0, 0); + public static Float4 UnitY => new Float4(0, 1, 0, 0); /// /// Gets an value with the component set to 1, and the others to 0 /// - public static Float4 UnitZ { get; } = new Float4(0, 0, 1, 0); + public static Float4 UnitZ => new Float4(0, 0, 1, 0); /// /// Gets an value with the component set to 1, and the others to 0 /// - public static Float4 UnitW { get; } = new Float4(0, 0, 0, 1); + public static Float4 UnitW => new Float4(0, 0, 0, 1); /// /// Creates a new instance with the specified parameters diff --git a/src/ComputeSharp.Core/Primitives/Int/Int2.cs b/src/ComputeSharp.Core/Primitives/Int/Int2.cs index e3848917..a892fdcc 100644 --- a/src/ComputeSharp.Core/Primitives/Int/Int2.cs +++ b/src/ComputeSharp.Core/Primitives/Int/Int2.cs @@ -12,22 +12,22 @@ namespace ComputeSharp /// /// Gets an value with all components set to 0 /// - public static Int2 Zero { get; } = 0; + public static Int2 Zero => 0; /// /// Gets an value with all components set to 1 /// - public static Int2 One { get; } = 1; + public static Int2 One => 1; /// /// Gets an value with the component set to 1, and the others to 0 /// - public static Int2 UnitX { get; } = new Int2(1, 0); + public static Int2 UnitX => new Int2(1, 0); /// /// Gets an value with the component set to 1, and the others to 0 /// - public static Int2 UnitY { get; } = new Int2(0, 1); + public static Int2 UnitY => new Int2(0, 1); /// /// Creates a new instance with the specified parameters diff --git a/src/ComputeSharp.Core/Primitives/Int/Int3.cs b/src/ComputeSharp.Core/Primitives/Int/Int3.cs index c76d2da6..0af3b759 100644 --- a/src/ComputeSharp.Core/Primitives/Int/Int3.cs +++ b/src/ComputeSharp.Core/Primitives/Int/Int3.cs @@ -12,27 +12,27 @@ namespace ComputeSharp /// /// Gets an value with all components set to 0 /// - public static Int3 Zero { get; } = 0; + public static Int3 Zero => 0; /// /// Gets an value with all components set to 1 /// - public static Int3 One { get; } = 1; + public static Int3 One => 1; /// /// Gets an value with the component set to 1, and the others to 0 /// - public static Int3 UnitX { get; } = new Int3(1, 0, 0); + public static Int3 UnitX => new Int3(1, 0, 0); /// /// Gets an value with the component set to 1, and the others to 0 /// - public static Int3 UnitY { get; } = new Int3(0, 1, 0); + public static Int3 UnitY => new Int3(0, 1, 0); /// /// Gets an value with the component set to 1, and the others to 0 /// - public static Int3 UnitZ { get; } = new Int3(0, 0, 1); + public static Int3 UnitZ => new Int3(0, 0, 1); /// /// Creates a new instance with the specified parameters diff --git a/src/ComputeSharp.Core/Primitives/Int/Int4.cs b/src/ComputeSharp.Core/Primitives/Int/Int4.cs index 18b7b88b..0242dd6c 100644 --- a/src/ComputeSharp.Core/Primitives/Int/Int4.cs +++ b/src/ComputeSharp.Core/Primitives/Int/Int4.cs @@ -12,32 +12,32 @@ namespace ComputeSharp /// /// Gets an value with all components set to 0 /// - public static Int4 Zero { get; } = 0; + public static Int4 Zero => 0; /// /// Gets an value with all components set to 1 /// - public static Int4 One { get; } = 1; + public static Int4 One => 1; /// /// Gets an value with the component set to 1, and the others to 0 /// - public static Int4 UnitX { get; } = new Int4(1, 0, 0, 0); + public static Int4 UnitX => new Int4(1, 0, 0, 0); /// /// Gets an value with the component set to 1, and the others to 0 /// - public static Int4 UnitY { get; } = new Int4(0, 1, 0, 0); + public static Int4 UnitY => new Int4(0, 1, 0, 0); /// /// Gets an value with the component set to 1, and the others to 0 /// - public static Int4 UnitZ { get; } = new Int4(0, 0, 1, 0); + public static Int4 UnitZ => new Int4(0, 0, 1, 0); /// /// Gets an value with the component set to 1, and the others to 0 /// - public static Int4 UnitW { get; } = new Int4(0, 0, 0, 1); + public static Int4 UnitW => new Int4(0, 0, 0, 1); /// /// Creates a new instance with the specified parameters diff --git a/src/ComputeSharp.Core/Primitives/UInt/UInt2.cs b/src/ComputeSharp.Core/Primitives/UInt/UInt2.cs index 25a8be54..4c3b14a7 100644 --- a/src/ComputeSharp.Core/Primitives/UInt/UInt2.cs +++ b/src/ComputeSharp.Core/Primitives/UInt/UInt2.cs @@ -12,22 +12,22 @@ namespace ComputeSharp /// /// Gets an value with all components set to 0 /// - public static UInt2 Zero { get; } = 0; + public static UInt2 Zero => 0; /// /// Gets an value with all components set to 1 /// - public static UInt2 One { get; } = 1; + public static UInt2 One => 1; /// /// Gets an value with the component set to 1, and the others to 0 /// - public static UInt2 UnitX { get; } = new UInt2(1, 0); + public static UInt2 UnitX => new UInt2(1, 0); /// /// Gets an value with the component set to 1, and the others to 0 /// - public static UInt2 UnitY { get; } = new UInt2(0, 1); + public static UInt2 UnitY => new UInt2(0, 1); /// /// Creates a new instance with the specified parameters diff --git a/src/ComputeSharp.Core/Primitives/UInt/UInt3.cs b/src/ComputeSharp.Core/Primitives/UInt/UInt3.cs index 27946391..d71c81ac 100644 --- a/src/ComputeSharp.Core/Primitives/UInt/UInt3.cs +++ b/src/ComputeSharp.Core/Primitives/UInt/UInt3.cs @@ -12,27 +12,27 @@ namespace ComputeSharp /// /// Gets an value with all components set to 0 /// - public static UInt3 Zero { get; } = 0; + public static UInt3 Zero => 0; /// /// Gets an value with all components set to 1 /// - public static UInt3 One { get; } = 1; + public static UInt3 One => 1; /// /// Gets an value with the component set to 1, and the others to 0 /// - public static UInt3 UnitX { get; } = new UInt3(1, 0, 0); + public static UInt3 UnitX => new UInt3(1, 0, 0); /// /// Gets an value with the component set to 1, and the others to 0 /// - public static UInt3 UnitY { get; } = new UInt3(0, 1, 0); + public static UInt3 UnitY => new UInt3(0, 1, 0); /// /// Gets an value with the component set to 1, and the others to 0 /// - public static UInt3 UnitZ { get; } = new UInt3(0, 0, 1); + public static UInt3 UnitZ => new UInt3(0, 0, 1); /// /// Creates a new instance with the specified parameters diff --git a/src/ComputeSharp.Core/Primitives/UInt/UInt4.cs b/src/ComputeSharp.Core/Primitives/UInt/UInt4.cs index ec40d048..3648e543 100644 --- a/src/ComputeSharp.Core/Primitives/UInt/UInt4.cs +++ b/src/ComputeSharp.Core/Primitives/UInt/UInt4.cs @@ -12,32 +12,32 @@ namespace ComputeSharp /// /// Gets an value with all components set to 0 /// - public static UInt4 Zero { get; } = 0; + public static UInt4 Zero => 0; /// /// Gets an value with all components set to 1 /// - public static UInt4 One { get; } = 1; + public static UInt4 One => 1; /// /// Gets an value with the component set to 1, and the others to 0 /// - public static UInt4 UnitX { get; } = new UInt4(1, 0, 0, 0); + public static UInt4 UnitX => new UInt4(1, 0, 0, 0); /// /// Gets an value with the component set to 1, and the others to 0 /// - public static UInt4 UnitY { get; } = new UInt4(0, 1, 0, 0); + public static UInt4 UnitY => new UInt4(0, 1, 0, 0); /// /// Gets an value with the component set to 1, and the others to 0 /// - public static UInt4 UnitZ { get; } = new UInt4(0, 0, 1, 0); + public static UInt4 UnitZ => new UInt4(0, 0, 1, 0); /// /// Gets an value with the component set to 1, and the others to 0 /// - public static UInt4 UnitW { get; } = new UInt4(0, 0, 0, 1); + public static UInt4 UnitW => new UInt4(0, 0, 0, 1); /// /// Creates a new instance with the specified parameters