mirror of
https://github.com/aelurum/AssetStudio.git
synced 2026-11-14 11:18:47 -05:00
19 lines
450 B
C#
19 lines
450 B
C#
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
|
|
}
|
|
}
|
|
}
|