15.6 怎样取整数?

最简单、直接的方法:
	(int)(x + 0.5)
这个方法对于负数并不正常工作。可以使用一个类似的方法:
	(int)(x < 0 ? x - 0.5 : x + 0.5)

翻译朱群英、孙云, LaTeX2HTML 编译 朱群英 (2005-06-23)