Vector3D.Negate Method ()

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Negates a Vector3D structure.

Namespace:   System.Windows.Media.Media3D
Assembly:  PresentationCore (in PresentationCore.dll)

public void Negate()

The vector has the same magnitude as before, but its direction is now opposite.

The following example shows how to negate a Vector3D structure.

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

.NET Framework
Available since 3.0
Return to top
Show: