Vector3D.Normalize メソッド

定義

指定した Vector3D 構造体を正規化します。Normalizes the specified Vector3D structure.

public:
 void Normalize();
public void Normalize ();
member this.Normalize : unit -> unit
Public Sub Normalize ()

次の例は、構造体をVector3D正規化する方法を示しています。The following example shows how to normalize a Vector3D structure.

// Normalizes a Vector3D using the Normalize method.  
// Returns a Vector3D.

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

vector1.Normalize();
// vector1 is approximately equal to (0.37139, 0.55709, 0.74278) 
' Normalizes a Vector3D using the Normalize method.  
' Returns a Vector3D.

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

vector1.Normalize()
' vector1 is approximately equal to (0.37139, 0.55709) 

注釈

正規化Vector3Dは、その方向を維持します1が、その大きさはになります。A normalized Vector3D maintains its direction but its magnitude becomes 1. 結果とVector3Dして得られるは、しばしば単位ベクターと呼ばれます。The resulting Vector3D is often called a unit vector. Vector3DVector3Dをその大きさで除算することによって正規化されます。A Vector3D is normalized by dividing the Vector3D by its magnitude.

適用対象