共用方式為


Vector2.op_UnaryNegation(Vector2) Method (Microsoft.DirectX)

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.