Java Float Number Mod mod(final float a, final float b)

Here you can find the source of mod(final float a, final float b)

Description

mod

License

Open Source License

Declaration

public static final float mod(final float a, final float b) 

Method Source Code

//package com.java2s;

public class Main {
    public static final float mod(final float a, final float b) {
        int n = (int) (a / b);
        float aa = a - n * b;
        if (aa < 0) {
            aa += b;//from w  ww .  ja v a  2  s. c om
        }
        return aa;
    }
}

Related

  1. fmod(double a, double b)
  2. fmod(double a, double b)
  3. FMod(double x, double y)
  4. fmodf(Float float1, float float2)
  5. fmodulo(double v1, double v2)
  6. mod(final float a, final float mod)
  7. mod(float a, float b)
  8. mod(float a, float b)
  9. mod(float a, float b)