Taal

Vector3D.Negate Methode

Definitie

Onderhandelt een Vector3D structuur.

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

Voorbeelden

In het volgende voorbeeld ziet u hoe u een Vector3D structuur kunt negateen.

// Negates a Vector3D using the Negate method.

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

vector1.Negate();
// vector1 is equal to (-20, -30, -40)
' Negates a Vector3D using the Negate method.

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

vector1.Negate()
' vector1 is equal to (-20, -30, -40)

Opmerkingen

De vector heeft dezelfde grootte als voorheen, maar de richting ervan is nu tegenovergestelde.

Van toepassing op

Zie ook