Fix audioClip converting
This commit is contained in:
18
AssetStudio/Math/Clamp.cs
Normal file
18
AssetStudio/Math/Clamp.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace AssetStudio
|
||||
{
|
||||
public static partial class MathHelper
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static float Clamp(float value, float minValue, float maxValue)
|
||||
{
|
||||
#if NETFRAMEWORK
|
||||
return Math.Max(minValue, Math.Min(value, maxValue));
|
||||
#else
|
||||
return Math.Clamp(value, minValue, maxValue);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user