Edit

Share via


Vector2.CreateScalar(Single) Method

Definition

Creates a vector with X initialized to the specified value and the remaining elements initialized to zero.

public:
 static System::Numerics::Vector2 CreateScalar(float x);
public static System.Numerics.Vector2 CreateScalar(float x);
static member CreateScalar : single -> System.Numerics.Vector2
Public Shared Function CreateScalar (x As Single) As Vector2

Parameters

x
Single

The value to assign to the X field.

Returns

A new Vector2 with X initialized x and the remaining elements initialized to zero.

Applies to