Vector2.op_UnaryNegation Method

Language:

Negates the vector.

Definition

Visual Basic Public Shared Function op_UnaryNegation( _
    ByVal vec As Vector2 _
) As Vector2
C# public static Vector2 op_UnaryNegation(
    Vector2 vec
);
C++ public:
static Vector2 operator-(
    Vector2 vec
);
JScript public static function op_UnaryNegation(
    vec : Vector2
) : Vector2;

Parameters

vec Microsoft.DirectX.Vector2
Source Vector2 structure.

Return Value

Microsoft.DirectX.Vector2
The Vector2 structure that is the result of the negation operation.

Remarks

This method switches positive and negative values of the Vector2 structure's X and Y fields.


Send comments about this topic to Microsoft. © Microsoft Corporation. All rights reserved.

Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center