Taal

Vector3D.Normalize Methode

Definitie

Normaliseert de opgegeven Vector3D structuur.

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

Voorbeelden

In het volgende voorbeeld ziet u hoe u een Vector3D structuur normaliseert.

// 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)

Opmerkingen

Een genormaliseerd Vector3D onderhoudt zijn richting, maar de grootte ervan wordt 1. Het resultaat Vector3D wordt vaak een eenheidsvector genoemd. A Vector3D wordt genormaliseerd door de door zijn Vector3D grootte te delen.

Van toepassing op