13 lines
353 B
C#
13 lines
353 B
C#
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.");
|
||
|
|
}
|
||
|
|
}
|