using System;

namespace MultiWheelC.TrajectoryPlanning.EMPlanner;

internal static class ContractNumeric
{
    public static void RequireFinite(double value, string parameterName)
    {
        if (double.IsNaN(value) || double.IsInfinity(value))
            throw new ArgumentOutOfRangeException(parameterName, "A finite value is required.");
    }
}
