共用方式為


Vector3D.LengthSquared 屬性

定義

取得這個 Vector3D 結構的長度平方。

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

屬性值

Double

這個 Vector3D 結構的長度平方。

範例

下列範例示範如何取得 結構的長度平方 Vector3D

// 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

備註

Vector3D 長度有時稱為大小。

適用於