canto/Assets/Scripts/Extension/Math.cs
2025-07-14 22:22:25 -04:00

17 lines
411 B
C#

using System;
namespace KitsuneCafe.Extension
{
public static class MathExtension
{
public static bool IsApproxEqual(this float value, float other)
{
return IsApproxEqual(value, other, 0.001f);
}
public static bool IsApproxEqual(this float value, float other, float epsilon)
{
return Math.Abs(value - other) < epsilon;
}
}
}