Fix audioClip converting

This commit is contained in:
VaDiM
2025-04-16 12:47:33 +03:00
parent a0c2a7bdfe
commit 13f37ec260
3 changed files with 20 additions and 6 deletions

18
AssetStudio/Math/Clamp.cs Normal file
View 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
}
}
}