mirror of
https://github.com/dhewm/dhewm3.git
synced 2024-11-23 04:51:56 +00:00
more fixes for Visual Studio 14
This commit is contained in:
parent
498ef9cb83
commit
c86e394da5
2 changed files with 6 additions and 6 deletions
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue