Here you can find the source of assertIsProb(double x)
public static void assertIsProb(double x)
//package com.java2s; //License from project: Apache License public class Main { public static void assertIsProb(double x) { assert isProb(x) : "Not a probability [0, 1]: " + x; }//from w ww.ja va2s . c o m public static boolean isProb(double x) { return x >= 0 && x <= 1 && !Double.isNaN(x); } }