From 13d3153a6a00fd838f1174eb8237bed3c0d3191b Mon Sep 17 00:00:00 2001 From: Oliver Booth Date: Sat, 6 Jan 2024 12:46:01 +0000 Subject: [PATCH] refactor!: remove ReadOnlySpan ctor from Vector3d --- VpSharp/src/Vector3d.cs | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/VpSharp/src/Vector3d.cs b/VpSharp/src/Vector3d.cs index e6db721..703cca4 100644 --- a/VpSharp/src/Vector3d.cs +++ b/VpSharp/src/Vector3d.cs @@ -58,22 +58,6 @@ public struct Vector3d : IEquatable, IFormattable Z = z; } - /// - /// Initializes a new instance of the struct from the given - /// . The span must contain at least 3 elements. - /// - /// The span of elements to assign to the vector. - /// contains fewer than 3 elements. - public Vector3d(ReadOnlySpan values) - { - if (values.Length < 3) - { - throw new ArgumentException("The specified span has an insufficient number of elements.", nameof(values)); - } - - this = Unsafe.ReadUnaligned(ref Unsafe.As(ref MemoryMarshal.GetReference(values))); - } - /// /// Gets the length of the vector. ///