Vector.ToScalar Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
ToScalar(Vector2) | |
ToScalar(Vector3) | |
ToScalar(Vector4) | |
ToScalar<T>(Vector<T>) |
Converts the given vector to a scalar containing the value of the first element. |
public:
[System::Runtime::CompilerServices::Extension]
static float ToScalar(System::Numerics::Vector2 vector);
public static float ToScalar(this System.Numerics.Vector2 vector);
static member ToScalar : System.Numerics.Vector2 -> single
<Extension()>
Public Function ToScalar (vector As Vector2) As Single
Parameters
- vector
- Vector2
Returns
Applies to
.NET 10
Produkt | Versiounen |
---|---|
.NET | 10 |
public:
[System::Runtime::CompilerServices::Extension]
static float ToScalar(System::Numerics::Vector3 vector);
public static float ToScalar(this System.Numerics.Vector3 vector);
static member ToScalar : System.Numerics.Vector3 -> single
<Extension()>
Public Function ToScalar (vector As Vector3) As Single
Parameters
- vector
- Vector3
Returns
Applies to
.NET 10
Produkt | Versiounen |
---|---|
.NET | 10 |
public:
[System::Runtime::CompilerServices::Extension]
static float ToScalar(System::Numerics::Vector4 vector);
public static float ToScalar(this System.Numerics.Vector4 vector);
static member ToScalar : System.Numerics.Vector4 -> single
<Extension()>
Public Function ToScalar (vector As Vector4) As Single
Parameters
- vector
- Vector4
Returns
Applies to
.NET 10
Produkt | Versiounen |
---|---|
.NET | 10 |
- Source:
- Vector.cs
- Source:
- Vector.cs
Converts the given vector to a scalar containing the value of the first element.
public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
static T ToScalar(System::Numerics::Vector<T> vector);
public static T ToScalar<T>(this System.Numerics.Vector<T> vector);
static member ToScalar : System.Numerics.Vector<'T> -> 'T
<Extension()>
Public Function ToScalar(Of T) (vector As Vector(Of T)) As T
Type Parameters
- T
The type of the elements in the vector.
Parameters
- vector
- Vector<T>
The vector to get the first element from.
Returns
A scalar T
containing the value of the first element.
Exceptions
The type of vector
(T
) is not supported.
Applies to
.NET 10 an aner Versiounen
Produkt | Versiounen |
---|---|
.NET | 8, 9, 10 |
Feedback zu .NET
.NET ass en Open-Source-Projet. Wielt e Link, fir Feedback ze ginn: