bugfix:
- add global namespace statement to sqrt. refactoring: - include cmath instead of math.h in c++ API. Signed-off-by: Kim Kulling <kim.kulling@googlemail.com>pull/251/head
parent
e97787aa5c
commit
f9d5852ef9
|
@ -53,7 +53,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
|
||||
#include <algorithm>
|
||||
#include <limits>
|
||||
|
||||
#ifdef __cplusplus
|
||||
# include <cmath>
|
||||
#else
|
||||
# include <math.h>
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------------------------
|
||||
template <typename TReal>
|
||||
|
|
|
@ -44,7 +44,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#ifndef AI_VECTOR2D_H_INC
|
||||
#define AI_VECTOR2D_H_INC
|
||||
|
||||
#ifdef __cplusplus
|
||||
# include <cmath>
|
||||
#else
|
||||
# include <math.h>
|
||||
#endif
|
||||
|
||||
#include "./Compiler/pushpack1.h"
|
||||
|
||||
|
|
|
@ -44,8 +44,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#ifndef AI_VECTOR3D_H_INC
|
||||
#define AI_VECTOR3D_H_INC
|
||||
|
||||
#ifdef __cplusplus
|
||||
# include <cmath>
|
||||
#else
|
||||
# include <math.h>
|
||||
|
||||
#endif
|
||||
|
||||
#include "./Compiler/pushpack1.h"
|
||||
|
||||
|
|
|
@ -90,7 +90,7 @@ AI_FORCE_INLINE TReal aiVector3t<TReal>::SquareLength() const {
|
|||
// ------------------------------------------------------------------------------------------------
|
||||
template <typename TReal>
|
||||
AI_FORCE_INLINE TReal aiVector3t<TReal>::Length() const {
|
||||
return sqrt( SquareLength());
|
||||
return ::sqrt( SquareLength());
|
||||
}
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
template <typename TReal>
|
||||
|
@ -207,6 +207,7 @@ AI_FORCE_INLINE aiVector3t<TReal> operator - ( const aiVector3t<TReal>& v) {
|
|||
return aiVector3t<TReal>( -v.x, -v.y, -v.z);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
|
||||
#endif // __cplusplus
|
||||
#endif // AI_VECTOR3D_INL_INC
|
||||
|
|
Loading…
Reference in New Issue