chore: save current workspace progress
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
|
||||
namespace MultiWheelC.TrajectoryPlanning.Utils;
|
||||
|
||||
public static class NumericGuard
|
||||
{
|
||||
public static bool IsFinite(double value) { return !double.IsNaN(value) && !double.IsInfinity(value); }
|
||||
public static bool IsFinite(float value) { return !float.IsNaN(value) && !float.IsInfinity(value); }
|
||||
public static bool IsPositiveFinite(double value) { return IsFinite(value) && value > 0d; }
|
||||
public static bool IsInRange(float value, float minimum, float maximum)
|
||||
{
|
||||
return IsFinite(value) && value >= minimum && value <= maximum;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user