XMVectorExp2 函数 (directxmath.h)

计算每个组件的两个幂。

语法

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

参数

[in] V

用于底 2 的指数的向量。

返回值

返回一个向量,其分量为两个,以 V 的相应分量的幂。

备注

平台要求

支持 Win32 桌面应用、Windows 应用商店应用和 Windows Phone 8 应用。

XMVectorExp2 是 DirectXMath 版本 3.05 的新增功能,但它只是适用于 Windows 8 的现有 XMVectorExp 函数的重命名版本。

XMVectorExp2 的实现方式如下:


XMVECTOR Result;

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

return Result;

要求

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

另请参阅

超越矢量函数

XMVectorExpE

XMVectorExp10

XMVectorLog2