Here you can find the source of clampLevel(float level)
public static float clampLevel(float level)
//package com.java2s; //License from project: Open Source License public class Main { public static float clampLevel(float level) { if (level <= 0.1f) return 0.1f; if (level >= 0.9f) return 1.0f; return level; }// w ww . j a v a 2s. c o m }