From b95de092f8f69ece8777ab2db699cbfb0e90d977 Mon Sep 17 00:00:00 2001 From: Oliver Booth Date: Wed, 30 Nov 2022 18:38:51 +0000 Subject: [PATCH] Don't use target-typed new for method returns --- VpSharp/src/Vector3d.cs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/VpSharp/src/Vector3d.cs b/VpSharp/src/Vector3d.cs index bf40ac8..cca7bd6 100644 --- a/VpSharp/src/Vector3d.cs +++ b/VpSharp/src/Vector3d.cs @@ -120,7 +120,7 @@ public struct Vector3d : IEquatable, IFormattable /// The summed vector. public static Vector3d operator +(in Vector3d left, in Vector3d right) { - return new( + return new Vector3d( left.X + right.X, left.Y + right.Y, left.Z + right.Z @@ -135,7 +135,7 @@ public struct Vector3d : IEquatable, IFormattable /// The difference vector. public static Vector3d operator -(in Vector3d left, in Vector3d right) { - return new( + return new Vector3d( left.X - right.X, left.Y - right.Y, left.Z - right.Z @@ -150,7 +150,7 @@ public struct Vector3d : IEquatable, IFormattable /// The product vector. public static Vector3d operator *(in Vector3d left, in Vector3d right) { - return new( + return new Vector3d( left.X * right.X, left.Y * right.Y, left.Z * right.Z @@ -165,7 +165,7 @@ public struct Vector3d : IEquatable, IFormattable /// The scaled vector. public static Vector3d operator *(in Vector3d left, double right) { - return new( + return new Vector3d( left.X * right, left.Y * right, left.Z * right @@ -180,7 +180,7 @@ public struct Vector3d : IEquatable, IFormattable /// The scaled vector. public static Vector3d operator *(double left, in Vector3d right) { - return new( + return new Vector3d( left * right.X, left * right.Y, left * right.Z @@ -195,7 +195,7 @@ public struct Vector3d : IEquatable, IFormattable /// The vector resulting from the division. public static Vector3d operator /(in Vector3d left, in Vector3d right) { - return new( + return new Vector3d( left.X / right.X, left.Y / right.Y, left.Z / right.Z @@ -210,7 +210,7 @@ public struct Vector3d : IEquatable, IFormattable /// The vector resulting from the division. public static Vector3d operator /(in Vector3d left, double right) { - return new( + return new Vector3d( left.X / right, left.Y / right, left.Z / right @@ -278,7 +278,7 @@ public struct Vector3d : IEquatable, IFormattable /// The absolute value vector. public static Vector3d Abs(in Vector3d value) { - return new( + return new Vector3d( Math.Abs(value.X), Math.Abs(value.Y), Math.Abs(value.Z) @@ -435,7 +435,7 @@ public struct Vector3d : IEquatable, IFormattable /// The square root vector. public static Vector3d SquareRoot(in Vector3d value) { - return new( + return new Vector3d( Math.Sqrt(value.X), Math.Sqrt(value.Y), Math.Sqrt(value.Z)