1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-18 19:29:09 +00:00

Use std::min and std::max

This commit is contained in:
2014-07-22 21:12:09 -07:00
parent 4f5a941d41
commit e36220cca5
35 changed files with 101 additions and 108 deletions

View File

@ -219,7 +219,7 @@ bool plDynaRippleMgr::IRippleFromShape(const plPrintShape* shape, bool force)
plConst(float) kHeightScale = 1.f;
pos.fZ += (shape->GetHeight() * fScale.fZ * kHeightScale) * 0.25f;
float wid = hsMaximum(shape->GetWidth(), shape->GetLength());
float wid = std::max(shape->GetWidth(), shape->GetLength());
hsVector3 size(wid * fScale.fX, wid * fScale.fY, shape->GetHeight() * fScale.fZ * kHeightScale);
fCutter->SetLength(size);
fCutter->Set(pos, dir, up);

View File

@ -212,7 +212,7 @@ bool plDynaRippleVSMgr::IRippleFromShape(const plPrintShape* shape, bool force)
hsVector3 dir(fWaveSetBase->GetWindDir());
hsVector3 up(0.f, 0.f, 1.f);
float wid = hsMaximum(shape->GetWidth(), shape->GetLength());
float wid = std::max(shape->GetWidth(), shape->GetLength());
plConst(float) kMaxWaterDepth(1000.f);

View File

@ -591,7 +591,7 @@ int plSpaceTreeMaker::ITreeDepth(plSpacePrepNode* subRoot)
int dep0 = ITreeDepth(subRoot->fChildren[0]);
int dep1 = ITreeDepth(subRoot->fChildren[1]);
int dep = hsMaximum(dep0, dep1);
int dep = std::max(dep0, dep1);
return dep+1;
}