mirror of
https://github.com/opensim/opensim.git
synced 2026-08-11 20:05:33 +08:00
Misc. cleanup:
* added Util.Clip(value, min, max) * modified asset cache's numPackets calculation to use max packet size (600) instead of 1000 * removed a few magic numbers
This commit is contained in:
@@ -373,5 +373,15 @@ namespace OpenSim.Framework
|
||||
config.Configs[(string) row[0]].Set(row.Table.Columns[i].ColumnName, row[i]);
|
||||
}
|
||||
}
|
||||
|
||||
public static float Clip(float x, float min, float max)
|
||||
{
|
||||
return Math.Min(Math.Max(x, min), max);
|
||||
}
|
||||
|
||||
public static int Clip(int x, int min, int max)
|
||||
{
|
||||
return Math.Min(Math.Max(x, min), max);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user