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 长度有时称为数量级。