BotSharp/BotSharp.Algorithm/HiddenMarkovModel/MathUtils/SpecialFunctions/ClampFunction.cs
2018-09-17 07:31:54 -05:00

16 lines
382 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace BotSharp.Algorithm.HiddenMarkovModel.MathUtils.SpecialFunctions
{
public class ClampFunction
{
public static double Clamp(double value, double lower, double upper)
{
return System.Math.Min(upper, System.Math.Max(value, lower));
}
}
}