Vector3D.UnaryNegation(Vector3D) Operator
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.
Negates a Vector3D structure.
public:
static System::Windows::Media::Media3D::Vector3D operator -(System::Windows::Media::Media3D::Vector3D vector);
public static System.Windows.Media.Media3D.Vector3D operator - (System.Windows.Media.Media3D.Vector3D vector);
static member ( ~- ) : System.Windows.Media.Media3D.Vector3D -> System.Windows.Media.Media3D.Vector3D
Public Shared Operator - (vector As Vector3D) As Vector3D
Parameters
Returns
A Vector3D structure with X, Y, and Z values opposite of the X, Y, and Z values of vector
.
Examples
The following example shows how to use the overloaded negation operator to negate a Vector3D structure.
// Negates a Vector3D using the overloaded unary negation operator.
Vector3D vector1 = new Vector3D(20, 30, 40);
Vector3D vectorResult = new Vector3D();
vectorResult = -vector1;
// vectorResult is equal to (-20, -30, -40)
' Negates a Vector3D using the overloaded unary negation operator.
Dim vector1 As New Vector3D(20, 30, 40)
Dim vectorResult As New Vector3D()
vectorResult = -vector1
' vectorResult is equal to (-20, -30, -40)
Remarks
The returned Vector3D structure has the same magnitude (Length) as vector
but its direction is opposite of that of vector
.
Applies to
See also
GitHub에서 Microsoft와 공동 작업
이 콘텐츠의 원본은 GitHub에서 찾을 수 있으며, 여기서 문제와 끌어오기 요청을 만들고 검토할 수도 있습니다. 자세한 내용은 참여자 가이드를 참조하세요.
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기