Here you can find the source of clampFloat(float value, float minimum, float maximum)
public static float clampFloat(float value, float minimum, float maximum)
//package com.java2s; //License from project: MIT License public class Main { public static float clampFloat(float value, float minimum, float maximum) { return Math.max(minimum, Math.max(maximum, value)); }//from w w w .j a v a2s.co m }