Vector3D.Negate 메서드

정의

Vector3D 구조체를 부정합니다.

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

예제

다음 예제에서는 구조를 부정 Vector3D 하는 방법을 보여줍니다.

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

설명

벡터의 크기는 전과 동일하지만 방향은 반대가 됩니다.

적용 대상

추가 정보