diff --git a/neo/cm/CollisionModel_load.cpp b/neo/cm/CollisionModel_load.cpp index ef786a00..acd2a3d7 100644 --- a/neo/cm/CollisionModel_load.cpp +++ b/neo/cm/CollisionModel_load.cpp @@ -1887,7 +1887,7 @@ static int CM_FindSplitter( const cm_node_t *node, const idBounds &bounds, int * continue; } // find the most centered splitter - t = abs((bounds[1][type] - dist) - (dist - bounds[0][type])); + t = idMath::Fabs((bounds[1][type] - dist) - (dist - bounds[0][type])); if ( t < bestt ) { bestt = t; *planeType = type; @@ -1907,7 +1907,7 @@ static int CM_FindSplitter( const cm_node_t *node, const idBounds &bounds, int * continue; } // find the most centered splitter - t = abs((bounds[1][type] - dist) - (dist - bounds[0][type])); + t = idMath::Fabs((bounds[1][type] - dist) - (dist - bounds[0][type])); if ( t < bestt ) { bestt = t; *planeType = type; diff --git a/neo/tools/compilers/roqvq/codec.cpp b/neo/tools/compilers/roqvq/codec.cpp index 344232f6..612d0885 100644 --- a/neo/tools/compilers/roqvq/codec.cpp +++ b/neo/tools/compilers/roqvq/codec.cpp @@ -322,7 +322,7 @@ void codec::Segment( int *alist, float *flist, int numElements, float rmse) int codec::BestCodeword( unsigned char *tempvector, int dimension, VQDATA **codebook ) { VQDATA dist; - VQDATA bestDist = HUGE_VAL; + VQDATA bestDist = idMath::INFINITY; VQDATA tempvq[64]; int bestIndex = -1; @@ -1505,7 +1505,7 @@ void codec::VQ( const int numEntries, const int dimension, const unsigned char * // // find the closest two and eliminate one // - double bestDist = HUGE_VAL; + double bestDist = idMath::INFINITY; double dist, simport; int bestIndex = -1; int bestOtherIndex = 0; @@ -1571,7 +1571,7 @@ void codec::VQ( const int numEntries, const int dimension, const unsigned char * // until we have reduced it to 256 entries, find one to toss // do { - bestDist = HUGE_VAL; + bestDist = idMath::INFINITY; bestIndex = -1; bestOtherIndex = -1; if (optimize) { @@ -1586,7 +1586,7 @@ void codec::VQ( const int numEntries, const int dimension, const unsigned char * } } if (bestIndex == -1 || !optimize) { - bestDist = HUGE_VAL; + bestDist = idMath::INFINITY; bestIndex = -1; bestOtherIndex = 0; aentries = 0;