math_aux.h
来自「symbian 上的stl_port进过编译的。」· C头文件 代码 · 共 22 行
H
22 行
#ifndef __MATH_AUX_H#define __MATH_AUX_H#include <limits>/* * This function is not only used to compare floating point values with a tolerance, * it also leads to ambiguity problems if the called functions do not have the * right prototype. */template <class _Tp>bool are_equals(_Tp val, _Tp ref) { if (val < ref) { return (ref - val) <= std::numeric_limits<_Tp>::epsilon(); } else { return (val - ref) <= std::numeric_limits<_Tp>::epsilon(); }}#endif // __MATH_AUX_H
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?