CSharpRoboticsLib.ControlSystems.SetPointProfile.NearestLess C# (CSharp) Метод

NearestLess() приватный Метод

private NearestLess ( double currentPoint ) : Setpoint
currentPoint double
Результат Setpoint
        private Setpoint NearestLess(double currentPoint)
        {
            Setpoint toReturn = m_profile[0];
            for (int i = 1; i < m_profile.Count; i++)
            {
                if (m_profile[i].Point > currentPoint)
                    return toReturn;
                toReturn = m_profile[i];
            }
            return toReturn;
        }