Here you can find the source of signumEps(double val, double eps)
public static double signumEps(double val, double eps)
//package com.java2s; //License from project: Open Source License public class Main { /**/* w w w. j av a 2 s . co m*/ * Signum functions with epsilon for floating point imprecision */ public static double signumEps(double val, double eps) { if (val < eps && val > -eps) return 0; else return Math.signum(val); } }