Here you can find the source of fmod(double a, double b)
Parameter | Description |
---|---|
a | Variable a |
b | Variable b |
public static double fmod(double a, double b)
//package com.java2s; //License from project: Open Source License public class Main { /**/*from ww w . j a v a 2 s .c o m*/ * Computes the floating-point remainder of a/b. * @param a Variable a * @param b Variable b * @return the result */ public static double fmod(double a, double b) { int result = (int) Math.floor(a / b); return a - result * b; } }