Here you can find the source of minMax(double v, double min, double max)
public static double minMax(double v, double min, double max)
//package com.java2s; // This code is released under the RoboWiki Public Code Licence (RWPCL), datailed on: public class Main { public static double minMax(double v, double min, double max) { return Math.max(min, Math.min(max, v)); }//from ww w . j ava2 s . com }