aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Util.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/Util.cs10
1 files changed, 10 insertions, 0 deletions
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs
index a8eef51..740f527 100644
--- a/OpenSim/Framework/Util.cs
+++ b/OpenSim/Framework/Util.cs
@@ -373,5 +373,15 @@ namespace OpenSim.Framework
373 config.Configs[(string) row[0]].Set(row.Table.Columns[i].ColumnName, row[i]); 373 config.Configs[(string) row[0]].Set(row.Table.Columns[i].ColumnName, row[i]);
374 } 374 }
375 } 375 }
376
377 public static float Clip(float x, float min, float max)
378 {
379 return Math.Min(Math.Max(x, min), max);
380 }
381
382 public static int Clip(int x, int min, int max)
383 {
384 return Math.Min(Math.Max(x, min), max);
385 }
376 } 386 }
377} 387}