Fix some bugs where round was actually roundNr
Now round (0 based) is always used
This commit is contained in:
1 parent
e6d8cf3ad9
commit
271772301d
7 files changed
+92
-75
No files matched your search
@@ -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>
|
||||
|
||||
Reference in new issue
Block a user