Here you can find the source of angleInRange(double angle, double min, double max)
public static boolean angleInRange(double angle, double min, double max)
//package com.java2s; //License from project: Open Source License public class Main { public static boolean angleInRange(double angle, double min, double max) { if (min < max) { return (angle > min && angle < max); }//from w ww .j a va 2 s .co m return (angle > min || angle < max); } }