To put it shortly, we were wrong and game developers are crazier than we thought.Games started breaking just by changing the floating point rounding mode!
英
美
- 博客中心思想:比较两个浮点数a和b的时候,决不要用 a == b,要用类似如下的方式 fabs(a-b) < epsilon 其中epsilon是一个很小的数字。