2026-06-05 13:44:39 +09:00

31 lines
929 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ILSOS_PrismaticGun.Tools
{
public static class CommonChecker
{
public static bool CheckInside(this double current, double target, double Gap)
{
if ((target - Gap) < current && current < (target + Gap))
return true;
return false;
}
public static bool CheckInsideRelMinMax(this double current, double target, double minRel, double maxRel)
{
if ((target + minRel) < current && current < (target + maxRel))
return true;
return false;
}
public static bool CheckInside(this int current, int target, int Gap)
{
if ((target - Gap) < current && current < (target + Gap))
return true;
return false;
}
}
}