Here you can find the source of rgbClamp(float c)
public static float rgbClamp(float c)
//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 }