Vector3D.LengthSquared Właściwość

Definicja

Pobiera kwadrat długości tej Vector3D struktury.

public:
 property double LengthSquared { double get(); };
public double LengthSquared { get; }
member this.LengthSquared : double
Public ReadOnly Property LengthSquared As Double

Wartość właściwości

Kwadrat długości tej Vector3D struktury.

Przykłady

W poniższym przykładzie pokazano, jak uzyskać kwadrat długości Vector3D struktury.

// Gets the square of the length of a Vector3D.  
// Returns a Vector3D.

Vector3D vector1 = new Vector3D(20, 30, 40);
Double lengthSq;

lengthSq = vector1.LengthSquared;
// lengthSq is equal to 2900
' Gets the square of the length of a Vector3D.  
' Returns a Vector3D.

Dim vector1 As New Vector3D(20, 30, 40)
Dim lengthSq As Double

lengthSq = vector1.LengthSquared
' lengthSq is equal to 2900

Uwagi

Długość Vector3D wartości jest czasami określana jako wielkość.

Dotyczy