Lezen in het Engels

Share via


operator -(XMVECTOR) method

Computes the negation of an XMVECTOR instance.

The operator - takes an instance of XMVECTOR Data Type and returns a new instance of XMVECTOR, with each component negated.

Note  This operator is only available under C++.

 

Syntax

c++
XMVECTOR operator -(
   XMVECTOR V
);

Parameters

  • V
    Vector whose components are to have their signs changed.

Return value

Vector whose components are the negation of V.

Remarks

The following pseudocode demonstrates the operation of this operator:


   XMVECTOR V;
   XMVECTOR Vout;
   Vout.x = - V.x;
   Vout.y = - V.y;
   Vout.z = - V.z;
   Vout.w = - V.w;

Requirements

Namespace

Use DirectX.

Header

DirectXMath.h

See also

operator -

Reference

XMVECTOR Data Type