Vector3D.Length 属性

定义

获取此 Vector3D 结构的长度。

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

属性值

Double

Vector3D 结构的长度。

示例

下面的示例演示如何获取结构的长度 Vector3D

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

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

length = vector1.Length;
// length is approximately equal to 53.85165
' Gets the length of a Vector3D.  
' Returns a Double.

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

length = vector1.Length
' length is approximately equal to 53.85165

注解

长度 Vector3D 有时称为数量级。

适用于