Here you can find the source of clipFloat(float value, float min, float max)
public static float clipFloat(float value, float min, float max)
//package com.java2s; //License from project: Open Source License public class Main { public static float clipFloat(float value, float min, float max) { if (value > max) value = max;/* w w w. j a va 2 s . c o m*/ if (value < min) value = min; return value; } }