Math: nextAfter(double start, double direction)
public class Main {
public static void main(String[] args) {
// Returns the lesser adjacent of a double
double lesserAdjacent = Math.nextAfter(123.0, 120.0);
System.out.println("Math.nextAfter (123.0, 120.0) = " + lesserAdjacent);
}
}
Related examples in the same category