* ./hurricane/src/hurricane :
- In Common.h, disable floatCompare(), floatDifference() & floatRound() as they triggers g++ warnings in optimized mode. Replace with roundfp().
This commit is contained in:
parent
0f7604a5fd
commit
51573cfa23
|
@ -133,6 +133,7 @@ namespace Hurricane {
|
|||
inline string demangle ( const type_info& info ) { return demangle(info.name()); }
|
||||
|
||||
|
||||
#if DEPRECATED
|
||||
// For a complete explanation of this function, please look at :
|
||||
// http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm
|
||||
|
||||
|
@ -158,6 +159,9 @@ namespace Hurricane {
|
|||
float rounded = roundf ( value*precision );
|
||||
value = rounded / precision;
|
||||
}
|
||||
#endif
|
||||
|
||||
inline float roundfp ( float value, float precision=100.0 ) { return roundf(value*precision)/precision; }
|
||||
|
||||
|
||||
} // End of Hurricane namespace.
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
INCLUDE_DIRECTORIES(${HURRICANE_SOURCE_DIR}/src/hurricane)
|
||||
|
||||
ADD_EXECUTABLE(htest HTest.cpp)
|
||||
|
||||
TARGET_LINK_LIBRARIES(htest hurricane)
|
||||
if ( BUILD_STATIC )
|
||||
include_directories ( ${HURRICANE_SOURCE_DIR}/src/hurricane )
|
||||
add_executable ( htest-static HTest.cpp )
|
||||
target_link_libraries ( htest-static hurricane-static )
|
||||
else ( BUILD_STATIC )
|
||||
include_directories ( ${HURRICANE_SOURCE_DIR}/src/hurricane )
|
||||
add_executable ( htest HTest.cpp )
|
||||
target_link_libraries ( htest hurricane )
|
||||
endif ( BUILD_STATIC )
|
||||
|
|
Loading…
Reference in New Issue