Add support for using unsigned integer input fields in Visject Surface editor
This commit is contained in:
@@ -316,6 +316,16 @@ namespace FlaxEngine
|
||||
return a <= b ? b : a;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the largest of two or more values.
|
||||
/// </summary>
|
||||
/// <param name="a"></param>
|
||||
/// <param name="b"></param>
|
||||
public static uint Max(uint a, uint b)
|
||||
{
|
||||
return a <= b ? b : a;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the largest of two or more values.
|
||||
/// </summary>
|
||||
@@ -401,6 +411,16 @@ namespace FlaxEngine
|
||||
return a >= b ? b : a;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the smallest of two or more values.
|
||||
/// </summary>
|
||||
/// <param name="a"></param>
|
||||
/// <param name="b"></param>
|
||||
public static uint Min(uint a, uint b)
|
||||
{
|
||||
return a >= b ? b : a;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the smallest of two or more values.
|
||||
/// </summary>
|
||||
@@ -1173,6 +1193,18 @@ namespace FlaxEngine
|
||||
return value < min ? min : value > max ? max : value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clamps the specified value.
|
||||
/// </summary>
|
||||
/// <param name="value">The value.</param>
|
||||
/// <param name="min">The min.</param>
|
||||
/// <param name="max">The max.</param>
|
||||
/// <returns>The result of clamping a value between min and max</returns>
|
||||
public static uint Clamp(uint value, uint min, uint max)
|
||||
{
|
||||
return value < min ? min : value > max ? max : value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Interpolates between two values using a linear function by a given amount.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user