refactor!: remove ReadOnlySpan<double> ctor from Vector3d

This commit is contained in:
Oliver Booth 2024-01-06 12:46:01 +00:00
parent 87c63de53b
commit 13d3153a6a
Signed by: oliverbooth
GPG Key ID: E60B570D1B7557B5
1 changed files with 0 additions and 16 deletions

View File

@ -58,22 +58,6 @@ public struct Vector3d : IEquatable<Vector3d>, IFormattable
Z = z;
}
/// <summary>
/// Initializes a new instance of the <see cref="Vector3d" /> struct from the given
/// <see cref="ReadOnlySpan{Single}" />. The span must contain at least 3 elements.
/// </summary>
/// <param name="values">The span of elements to assign to the vector.</param>
/// <exception cref="ArgumentException"><paramref name="values" /> contains fewer than 3 elements.</exception>
public Vector3d(ReadOnlySpan<double> values)
{
if (values.Length < 3)
{
throw new ArgumentException("The specified span has an insufficient number of elements.", nameof(values));
}
this = Unsafe.ReadUnaligned<Vector3d>(ref Unsafe.As<double, byte>(ref MemoryMarshal.GetReference(values)));
}
/// <summary>
/// Gets the length of the vector.
/// </summary>