Vector3D.LengthSquared 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得這個 Vector3D 結構的長度平方。
public:
property double LengthSquared { double get(); };
public double LengthSquared { get; }
member this.LengthSquared : double
Public ReadOnly Property LengthSquared As 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 長度有時稱為大小。