Java Number Max Value maxDelta(float newValue, float oldValue, float maxChange)

Here you can find the source of maxDelta(float newValue, float oldValue, float maxChange)

Description

max Delta

License

Open Source License

Declaration

public static float maxDelta(float newValue, float oldValue, float maxChange) 

Method Source Code

//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;
    }
}

Related

  1. max3(int a, int b, int c)
  2. max3(int first, int second, int third)
  3. MAX3(int x, int y, int z)
  4. max4(double v1, double v2, double v3, double v4)
  5. max8(double v1, double v2, double v3, double v4, double v5, double v6, double v7, double v8)
  6. maxF(float a, float b)
  7. maxFill(final int n, final float f)
  8. maxFill(final int n, final float f)
  9. maxFloat(float var1, float var2)