Vector3D.Negate Metode

Definisi

Meniadakan Vector3D struktur.

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

Contoh

Contoh berikut menunjukkan cara meniadakan Vector3D struktur.

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

Keterangan

Vektor memiliki besaran yang sama seperti sebelumnya, tetapi arahnya sekarang berlawanan.

Berlaku untuk

Lihat juga