XMVectorLog2 method

Computes the base two logarithm of each component of a vector.

Syntax


XMVECTOR XMVectorLog2(
  [in] XMVECTOR V
);

Parameters

V [in]

Vector for which to compute the base two logarithm.

Return value

Returns a vector whose components are base two logarithm of the corresponding components of V.

Remarks

Platform Requirements

Microsoft Visual Studio 2010 or Microsoft Visual Studio 2012 with the Windows SDK for Windows 8.1. Supported for Win32 desktop apps, Windows Store apps, and Windows Phone 8 apps.

XMVectorLog2 is new for DirectXMath version 3.05, but it's just a renamed version of the existing XMVectorLog function for Windows 8.

XMVectorLog2 is implemented like this:


XMVECTOR Result;

Result.x = logf(V.x) / logf(2);
Result.y = logf(V.y) / logf(2);
Result.z = logf(V.z) / logf(2);
Result.w = logf(V.w) / logf(2);

return Result;

Requirements

Namespace

Use DirectX.

Header

DirectXMath.h

See also

Transcendental Vector Functions
XMVectorExp2
XMVectorLogE

 

 

Show: