Here you can find the source of maxDelta(float newValue, float oldValue, float maxChange)
public static float maxDelta(float newValue, float oldValue, float maxChange)
//package com.java2s; //License from project: Open Source License public class Main { public static float maxDelta(float newValue, float oldValue, float maxChange) { if ((newValue - oldValue) > maxChange) { return oldValue + maxChange; }/* www.ja v a2 s . co m*/ if ((oldValue - newValue) > maxChange) { return oldValue - maxChange; } return newValue; } }