Fix some bugs where round was actually roundNr

Now round (0 based) is always used
This commit is contained in:
Flamefire committed 2013-10-08 18:01:08 +02:00
1 parent e6d8cf3ad9
commit 271772301d
7 files changed
+92 -75

No files matched your search

+9
View File
@@ -47,6 +47,15 @@ namespace VocaluxeLib
return (int)result;
}
public static T Clamp<T>(this T val, T min, T max) where T : IComparable<T>
{
if (val.CompareTo(min) < 0)
return min;
if (val.CompareTo(max) > 0)
return max;
return val;
}
/// <summary>
/// Concat strings into one string with ", " as separator.
/// </summary>