Java Integer Clamp clampColor(int c)

Here you can find the source of clampColor(int c)

Description

clamp Color

License

Open Source License

Declaration

public static int clampColor(int c) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static int clampColor(int c) {
        return c < 0 ? 0 : c > 255 ? 255 : c;
    }//from  ww  w.j  av a  2 s  .com
}

Related

  1. clamp(String string, int maxChars)
  2. clamp_int(int num, int min, int max)
  3. clamp_wrap(int a, int x, int y)
  4. clampAngle(int angle)
  5. clampByte(int in)
  6. clampColorInt(int color)
  7. CLAMPED_Wr(long ITERW, int FBZCP)
  8. clampI(int a, int min, int max)
  9. clampInt(final int min, final int max, final int value)