mirror of
https://github.com/opensim/opensim.git
synced 2026-08-11 11:57:03 +08:00
replace Util.Clamp<T>()
This commit is contained in:
@@ -408,7 +408,7 @@ namespace OpenSim.Region.PhysicsModule.BulletS
|
||||
get { return base.Efficiency; }
|
||||
set
|
||||
{
|
||||
base.Efficiency = Util.Clamp(value, 0f, 1f);
|
||||
base.Efficiency = Math.Clamp(value, 0f, 1f);
|
||||
|
||||
// Compute factors based on efficiency.
|
||||
// If efficiency is high (1f), use a factor value that moves the error value to zero with little overshoot.
|
||||
|
||||
@@ -1606,7 +1606,7 @@ namespace OpenSim.Region.PhysicsModule.BulletS
|
||||
|
||||
returnMass = Density * BSParam.DensityScaleFactor * volume;
|
||||
|
||||
returnMass = Util.Clamp(returnMass, BSParam.MinimumObjectMass, BSParam.MaximumObjectMass);
|
||||
returnMass = Math.Clamp(returnMass, BSParam.MinimumObjectMass, BSParam.MaximumObjectMass);
|
||||
// DetailLog("{0},BSPrim.CalculateMass,den={1},vol={2},mass={3}", LocalID, Density, volume, returnMass);
|
||||
DetailLog("{0},BSPrim.CalculateMass,den={1},vol={2},mass={3},pathB={4},pathE={5},profB={6},profE={7},siz={8}",
|
||||
LocalID, Density, volume, returnMass, pathBegin, pathEnd, profileBegin, profileEnd, _size);
|
||||
|
||||
@@ -363,8 +363,8 @@ namespace OpenSim.Region.PhysicsModule.BulletS
|
||||
// First, base addresses are never negative so correct for that possible problem.
|
||||
if (ret.X < 0f || ret.Y < 0f)
|
||||
{
|
||||
ret.X = Util.Clamp<float>(ret.X, 0f, 1000000f);
|
||||
ret.Y = Util.Clamp<float>(ret.Y, 0f, 1000000f);
|
||||
ret.X = Math.Clamp(ret.X, 0f, 1000000f);
|
||||
ret.Y = Math.Clamp(ret.Y, 0f, 1000000f);
|
||||
DetailLog("{0},BSTerrainManager.ClampPositionToKnownTerrain,zeroingNegXorY,oldPos={1},newPos={2}",
|
||||
BSScene.DetailLogZero, pPos, ret);
|
||||
}
|
||||
@@ -510,8 +510,8 @@ namespace OpenSim.Region.PhysicsModule.BulletS
|
||||
return ret;
|
||||
|
||||
// Just some sanity
|
||||
ret.X = Util.Clamp<float>(ret.X, 0f, 1000000f);
|
||||
ret.Y = Util.Clamp<float>(ret.Y, 0f, 1000000f);
|
||||
ret.X = Math.Clamp(ret.X, 0f, 1000000f);
|
||||
ret.Y = Math.Clamp(ret.Y, 0f, 1000000f);
|
||||
ret.Z = 0f;
|
||||
|
||||
lock (m_terrains)
|
||||
|
||||
Reference in New Issue
Block a user