XMVectorLogE 函数 (directxmath.h)

计算向量的每个组件的基数 e 对数。底 e 对数也称为自然对数。

语法

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

参数

[in] V

要计算其基础 e 对数的向量。

返回值

返回一个向量,其组件是 V 的相应组件的基数 e 对数。

备注

平台要求

Microsoft Visual Studio 2010 或 Microsoft Visual Studio 2012 与 Windows SDK for Windows 8.1。 支持 Win32 桌面应用、Windows 应用商店应用和 Windows Phone 8 应用。

XMVectorLogE 是 DirectXMath 版本 3.05 的新增功能。

它类似于 Windows 8 的现有 XMVectorLog 函数,但计算 base e 而不是 base 2。

XMVectorLogE 的实现方式如下:


XMVECTOR Result;

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

return Result;

要求

   
目标平台 Windows
标头 directxmath.h (包括 DirectXMath.h)

另请参阅

超越向量函数

XMVectorLog2

XMVectorLog10

XMVectorExpE