Edit

Share via


Vector.CreateScalar<T>(T) Method

Definition

Creates a new Vector<T> instance with the first element initialized to the specified value and the remaining elements initialized to zero.

public:
generic <typename T>
 static System::Numerics::Vector<T> CreateScalar(T value);
public static System.Numerics.Vector<T> CreateScalar<T>(T value);
static member CreateScalar : 'T -> System.Numerics.Vector<'T>
Public Function CreateScalar(Of T) (value As T) As Vector(Of T)

Type Parameters

T

The type of the elements in the vector.

Parameters

value
T

The value that element 0 will be initialized to.

Returns

A new Vector<T> instance with the first element initialized to value and the remaining elements initialized to zero.

Exceptions

The type of value (T) is not supported.

Applies to