Olvasás angol nyelven Szerkesztés

Megosztás a következőn keresztül:


Vector.ToScalar Method

Definition

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.

Overloads

ToScalar(Vector2)
ToScalar(Vector3)
ToScalar(Vector4)
ToScalar<T>(Vector<T>)

Converts the given vector to a scalar containing the value of the first element.

ToScalar(Vector2)

C#
public static float ToScalar(this System.Numerics.Vector2 vector);

Parameters

vector
Vector2

Returns

Applies to

.NET 10
Termék Verziók
.NET 10

ToScalar(Vector3)

C#
public static float ToScalar(this System.Numerics.Vector3 vector);

Parameters

vector
Vector3

Returns

Applies to

.NET 10
Termék Verziók
.NET 10

ToScalar(Vector4)

C#
public static float ToScalar(this System.Numerics.Vector4 vector);

Parameters

vector
Vector4

Returns

Applies to

.NET 10
Termék Verziók
.NET 10

ToScalar<T>(Vector<T>)

Source:
Vector.cs
Source:
Vector.cs

Converts the given vector to a scalar containing the value of the first element.

C#
public static T ToScalar<T>(this System.Numerics.Vector<T> vector);

Type Parameters

T

The type of the elements in the vector.

Parameters

vector
Vector<T>

The vector to get the first element from.

Returns

T

A scalar T containing the value of the first element.

Exceptions

The type of vector (T) is not supported.

Applies to

.NET 10 és más verziók
Termék Verziók
.NET 8, 9, 10