XMVectorCeiling 函数 (directxmath.h)

计算 XMVECTOR 每个组件的上限。

语法

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

参数

[in] V

要计算其上限的向量。

返回值

返回一个向量,其分量是 V 的相应分量的上限。

注解

平台要求

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

XMVectorCeiling 的实现方式如下:


XMVECTOR Result; 
Result.x = ceilf(V.x); 
Result.y = ceilf(V.y); 
Result.z = ceilf(V.z); 
Result.w = ceilf(V.w); 
return Result; 

要求

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

另请参阅

矢量算术函数

XMVectorFloor