Vector3D.Length 屬性

定義

取得這個 Vector3D 結構的長度。Gets the length of this Vector3D structure.

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

屬性值

這個 Vector3D 結構的長度。The length of this Vector3D structure.

範例

下列範例顯示如何取得Vector3D結構的長度。The following example shows how to get the length of a Vector3D structure.

// 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有時稱為「大小」。The length of a Vector3D is sometimes referred to as the magnitude.

適用於