Java Integer Mod modulo(int x, int y)

Here you can find the source of modulo(int x, int y)

Description

modulo

License

Creative Commons License

Declaration

public static int modulo(int x, int y) 

Method Source Code

//package com.java2s;
//License from project: Creative Commons License 

public class Main {
    public static int modulo(int x, int y) {
        int z = x % y;
        return z < 0 ? z + y : z;
    }/*from   w  w  w .  j av a2 s.  c  o m*/
}

Related

  1. modulo(int a, int b)
  2. modulo(int a, int b)
  3. modulo(int dividend, int divisor)
  4. modulo(int x, int m)
  5. modulo(int x, int mod)
  6. moduloPositive(final int value, final int size)
  7. moduloPowerOfTwo(final int x, final int powerOfTwoY)
  8. modulus(int a, int b)
  9. modulus(int a, int b)