Example usage for java.lang StrictMath IEEEremainder

List of usage examples for java.lang StrictMath IEEEremainder

Introduction

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

Prototype

public static native double IEEEremainder(double f1, double f2);

Source Link

Document

Computes the remainder operation on two arguments as prescribed by the IEEE 754 standard.

Usage

From source file:Main.java

public static void main(String[] args) {

    double d1 = 123.45d, d2 = 32.10d;

    System.out.println(StrictMath.IEEEremainder(d1, d2));

    d1 = 32.10d;/*from  www . j a  v  a  2  s.co  m*/
    d2 = (1.0) / (0.0);

    System.out.println(StrictMath.IEEEremainder(d1, d2));
}

From source file:Main.java

public static double normalizeAngle(double degree) {
    return (StrictMath.IEEEremainder(degree, 360));
}