Vector3D.Normalize Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Normalizes the specified Vector3D structure.
public:
void Normalize();
public void Normalize ();
member this.Normalize : unit -> unit
Public Sub Normalize ()
Examples
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)
Remarks
A normalized Vector3D maintains its direction but its magnitude becomes 1
. The resulting Vector3D is often called a unit vector. A Vector3D is normalized by dividing the Vector3D by its magnitude.
Applies to
Povratne informacije
https://aka.ms/ContentUserFeedback.
Stiže uskoro: Tijekom 2024. postupno ćemo ukinuti servis Problemi sa servisom GitHub kao mehanizam za povratne informacije za sadržaj i zamijeniti ga novim sustavom za povratne informacije. Dodatne informacije potražite u članku:Pošaljite i pogledajte povratne informacije za