Index: src/libchcore/MathFunctions.cpp =================================================================== diff -u -N -r9b8cccbee0fcfeca28a112cc0253a7641f73f74f -re96806b7f8ff7ca7e9f4afbea603e6351a3dc3e3 --- src/libchcore/MathFunctions.cpp (.../MathFunctions.cpp) (revision 9b8cccbee0fcfeca28a112cc0253a7641f73f74f) +++ src/libchcore/MathFunctions.cpp (.../MathFunctions.cpp) (revision e96806b7f8ff7ca7e9f4afbea603e6351a3dc3e3) @@ -2,24 +2,23 @@ #include "MathFunctions.h" #include -BEGIN_CHCORE_NAMESPACE - -namespace Math +namespace chcore { - double Div64(unsigned long long ullNumber, unsigned long long ullDenominator) + namespace Math { - if(ullDenominator == 0) - return 0.0; - - const unsigned long long ullMaxInt32 = (unsigned long long)std::numeric_limits::max(); - while(ullNumber > ullMaxInt32 || ullDenominator > ullMaxInt32) + double Div64(unsigned long long ullNumber, unsigned long long ullDenominator) { - ullNumber >>= 1; - ullDenominator >>= 1; - } + if (ullDenominator == 0) + return 0.0; - return boost::numeric_cast(ullNumber) / boost::numeric_cast(ullDenominator); + const unsigned long long ullMaxInt32 = (unsigned long long)std::numeric_limits::max(); + while (ullNumber > ullMaxInt32 || ullDenominator > ullMaxInt32) + { + ullNumber >>= 1; + ullDenominator >>= 1; + } + + return boost::numeric_cast(ullNumber) / boost::numeric_cast(ullDenominator); + } } } - -END_CHCORE_NAMESPACE