Java Integer Clamp clamp(int v, int min, int max)

Here you can find the source of clamp(int v, int min, int max)

Description

clamp

License

Open Source License

Declaration

public static final int clamp(int v, int min, int max) 

Method Source Code

//package com.java2s;

public class Main {
    public static final float clamp(float v, float min, float max) {
        return Math.max(Math.min(v, max), min);
    }//from   w  w w  . j  av a  2s.c om

    public static final int clamp(int v, int min, int max) {
        return Math.max(Math.min(v, max), min);
    }
}

Related

  1. clamp(int n, int min, int max)
  2. clamp(int n, int min, int max)
  3. clamp(int num, int min, int max)
  4. clamp(int number, int low, int high)
  5. clamp(int ptr, int size)
  6. clamp(int v, int min, int max)
  7. clamp(int v, int min, int max)
  8. clamp(int val, int min, int max)
  9. clamp(int value, final int minimum, final int maximum)