XMVectorLog2 function (directxmath.h)

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

Syntax

XMVECTOR XM_CALLCONV XMVectorLog2(
  [in] FXMVECTOR V
) noexcept;

Parameters

[in] V

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 = log2f(V.x);
Result.y = log2f(V.y);
Result.z = log2f(V.z);
Result.w = log2f(V.w);

return Result;

Requirements

Requirement Value
Target Platform Windows
Header directxmath.h (include DirectXMath.h)

See also

Transcendental Vector Functions

XMVectorLogE

XMVectorLog10

XMVectorExp2