浮点数强制转换为整数高效替代方法

//浮点数转换为整数 == [i=(int)f],但效率会比其高出很多
inline void F_T_I( const float f, int  i  )
{
	__asm
	{
		fld f;
		fistp i;
	}
}

 
 



猜你喜欢

转载自blog.csdn.net/cherishpart/article/details/43190753
今日推荐