Java RGB Color Create rgbClamp(float c)

Here you can find the source of rgbClamp(float c)

Description

rgb Clamp

License

Open Source License

Declaration

public static float rgbClamp(float c) 

Method Source Code

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

public class Main {
    public static float rgbClamp(float c) {
        return c > 1f ? 1f : c < 0f ? 0f : c;
    }//from   w w w.  ja  va 2 s.com
}

Related

  1. rgba_bilinear_filter(int rgb00, int rgb01, int rgb10, int rgb11, int u, int v)
  2. rgbaColour(int red, int green, int blue, int alpha)
  3. RGBAequals(float[] rgba1, float[] rgba2, float eps)
  4. RGBAFromHEX(String stringValue)
  5. RGBAFromHSLA(float h, float s, float l, float a)
  6. rgbComponents(int argb)
  7. rgbDistance(int color1, int color2)
  8. rgbFromColorInt(int c)
  9. rgbFromGrayscale(int grayscale)