Example usage for java.lang StrictMath nextUp

List of usage examples for java.lang StrictMath nextUp

Introduction

In this page you can find the example usage for java.lang StrictMath nextUp.

Prototype

public static float nextUp(float f) 

Source Link

Document

Returns the floating-point value adjacent to f in the direction of positive infinity.

Usage

From source file:Main.java

public static void main(String[] args) {

    float f1 = 12.3f, f2 = 45.6f;

    System.out.println(StrictMath.nextUp(f1));

    System.out.println(StrictMath.nextUp(f2));
}

From source file:Main.java

public static void main(String[] args) {

    double d1 = 12.3400000000000, d2 = 98.76;

    System.out.println(StrictMath.nextUp(d1));

    System.out.println(StrictMath.nextUp(d2));
}