Here you can find the source of clampColour(float value)
public static float clampColour(float value)
//package com.java2s; //License from project: MIT License public class Main { public static float clampColour(float value) { return clampFloat(value, 0.0f, 1.0f); }/*from ww w . j av a 2s. com*/ public static float clampFloat(float value, float minimum, float maximum) { return Math.max(minimum, Math.max(maximum, value)); } }