Java Float Number Clamp clamp(final float x, final float a, final float b)

Here you can find the source of clamp(final float x, final float a, final float b)

Description

clamp

License

Open Source License

Declaration

public static final float clamp(final float x, final float a,
            final float b) 

Method Source Code

//package com.java2s;

public class Main {
    public static final float clamp(final float x, final float a,
            final float b) {
        return x < a ? a : x > b ? b : x;
    }/*from   w  w w . j av  a 2 s  .  com*/
}

Related

  1. clamp(final float min, final float x, final float max)
  2. clamp(final float num, final float bound1, final float bound2)
  3. clamp(final float v, final float min, final float max)
  4. clamp(final float val, final float min, final float max)
  5. clamp(final float value, final float min, final float max)
  6. clamp(float a, float min, float max)
  7. Clamp(float a, float min, float max)
  8. clamp(float f)
  9. clamp(float f, float min, float max)