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:
@ -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);
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user