---
UID: NF:directxpackedvector.XMUBYTE2.operator-assign
title: XMUBYTE2::operator-assign (directxpackedvector.h)
description: Assigns the vector component data from one instance of XMUBYTE2 to the current instance of XMUBYTE2.
old-location: dxmath\xmubyte2_operator_eq.htm
tech.root: dxmath
ms.assetid: M:Microsoft.directx_sdk.reference.XMUBYTE2.operator = (const XMUBYTE2)
ms.date: 05/06/2019
ms.keywords: DirectX::PackedVector.XMUBYTE2.operator =, DirectX::PackedVector::XMUBYTE2::operator =, XMUBYTE2 structure [DirectX Math Support APIs],operator = method, XMUBYTE2.operator =, XMUBYTE2.operator-assign, XMUBYTE2.operator=, XMUBYTE2::operator-assign, XMUBYTE2::operator=, dxmath.xmubyte2_operator_eq, operator = method [DirectX Math Support APIs], operator = method [DirectX Math Support APIs],XMUBYTE2 structure, operator=
f1_keywords:
- directxpackedvector/XMUBYTE2.operator =
dev_langs:
- c++
req.header: directxpackedvector.h
req.include-header: 
req.target-type: Windows
req.target-min-winverclnt: 
req.target-min-winversvr: 
req.kmdf-ver: 
req.umdf-ver: 
req.ddi-compliance: 
req.unicode-ansi: 
req.idl: 
req.max-support: 
req.namespace: DirectX::PackedVector
req.assembly: 
req.type-library: 
req.lib: 
req.dll: 
req.irql: 
topic_type:
- APIRef
- kbSyntax
api_type:
- COM
api_location:
- DirectXPackedVector.h
api_name:
- XMUBYTE2.operator =
targetos: Windows
req.typenames: 
req.redist: 
ms.custom: 19H1
---

# XMUBYTE2::operator-assign

## -description

Assigns the vector component data from one instance of <code>XMUBYTE2</code> to the current instance of <code>XMUBYTE2</code>.

This operator assigns the vector component data from one instance of <a href="https://msdn.microsoft.com/b22e9c5c-c178-4f49-989c-42e44b2cbd89">XMUBYTE2</a> to the current  instance of <code>XMUBYTE2</code>.

<div class="alert"><b>Note</b>  This operator is only available with C++.</div>

## -parameters

### -param arg1

Instance of <code>XMUBYTE2</code> used to update the current <code>XMUBYTE2</code> structure.

## -returns

The current instance of <code>XMUBYTE2</code> whose vector component data has been updated to match those of the <code>XMUBYTE2</code> instance specified by the <b>Byte2</b> argument.

## -see-also

<a href="https://msdn.microsoft.com/b22e9c5c-c178-4f49-989c-42e44b2cbd89">XMUBYTE2</a>

<a href="https://msdn.microsoft.com/6c58c08e-d8a1-405d-8f86-495ab4a72723">XMUBYTE2 Operators</a>
