Разные правки

This commit is contained in:
2020-04-23 12:11:03 +03:00
parent 8d9a5590d7
commit cde0cf76a7
11 changed files with 29 additions and 20 deletions

View File

@ -14,7 +14,7 @@ namespace myx {
namespace math {
MYXLIB_INLINE bool almost_equal_relative( const float a, const float b,
const float maxRelDiff )
const float maxRelDiff )
{
float diff = fabsf( a - b );
float aN = fabsf( a );
@ -30,7 +30,7 @@ MYXLIB_INLINE bool almost_equal_relative( const float a, const float b,
MYXLIB_INLINE bool almost_equal_relative( const double a, const double b,
const double maxRelDiff )
const double maxRelDiff )
{
double diff = fabs( a - b );
double aN = fabs( a );
@ -48,4 +48,4 @@ MYXLIB_INLINE bool almost_equal_relative( const double a, const double b,
} // namespace myx
#endif
#endif // ifndef MYX_MATH_ALMOST_EQUAL_RELATIVE_INL_HPP_

View File

@ -14,7 +14,7 @@ namespace myx {
namespace math {
MYXLIB_INLINE bool almost_equal_relative_and_abs( const float a, const float b,
const float maxAbsDiff, const float maxRelDiff )
const float maxAbsDiff, const float maxRelDiff )
{
// Check if the numbers are really close -- needed
// when comparing numbers near zero.
@ -37,7 +37,7 @@ MYXLIB_INLINE bool almost_equal_relative_and_abs( const float a, const float b,
MYXLIB_INLINE bool almost_equal_relative_and_abs( const double a, const double b,
const double maxAbsDiff, const double maxRelDiff )
const double maxAbsDiff, const double maxRelDiff )
{
// Check if the numbers are really close -- needed
// when comparing numbers near zero.
@ -62,4 +62,4 @@ MYXLIB_INLINE bool almost_equal_relative_and_abs( const double a, const double b
} // namespace myx
#endif
#endif // ifndef MYX_MATH_ALMOST_EQUAL_RELATIVE_AND_ABS_INL_HPP_

View File

@ -16,7 +16,7 @@ namespace myx {
namespace math {
MYXLIB_INLINE bool almost_equal_ulps( const float a, const float b,
const int maxUlpsDiff )
const int maxUlpsDiff )
{
FloatCmp uA( a );
FloatCmp uB( b );
@ -52,7 +52,7 @@ MYXLIB_INLINE bool almost_equal_ulps( const float a, const float b,
MYXLIB_INLINE bool almost_equal_ulps( const double a, const double b,
const int maxUlpsDiff )
const int maxUlpsDiff )
{
DoubleCmp uA( a );
DoubleCmp uB( b );
@ -90,4 +90,4 @@ MYXLIB_INLINE bool almost_equal_ulps( const double a, const double b,
} // namespace myx
#endif
#endif // ifndef MYX_MATH_ALMOST_EQUAL_ULPS_INL_HPP_

View File

@ -16,7 +16,7 @@ namespace myx {
namespace math {
MYXLIB_INLINE bool almost_equal_ulps_and_abs( const float a, const float b,
const float maxAbsDiff, const int maxUlpsDiff )
const float maxAbsDiff, const int maxUlpsDiff )
{
// Check if the numbers are really close -- needed
// when comparing numbers near zero.
@ -49,7 +49,7 @@ MYXLIB_INLINE bool almost_equal_ulps_and_abs( const float a, const float b,
MYXLIB_INLINE bool almost_equal_ulps_and_abs( const double a, const double b,
const double maxAbsDiff, const int maxUlpsDiff )
const double maxAbsDiff, const int maxUlpsDiff )
{
// Check if the numbers are really close -- needed
// when comparing numbers near zero.
@ -84,4 +84,4 @@ MYXLIB_INLINE bool almost_equal_ulps_and_abs( const double a, const double b,
} // namespace myx
#endif
#endif // ifndef MYX_MATH_ALMOST_EQUAL_ULPS_INL_HPP_

View File

@ -15,4 +15,4 @@ namespace math {
} // namespace myx
#endif
#endif // ifndef MYX_MATH_CONSTANTS_INL_HPP_

View File

@ -12,7 +12,7 @@ namespace myx {
namespace math {
const auto ImpedanceOfFreeSpace = (M_PI * 119.9169832);
const auto ImpedanceOfFreeSpace = ( M_PI * 119.9169832 );
} // namespace math