Java Number Round roundUpTo(int a, int quanta)

Here you can find the source of roundUpTo(int a, int quanta)

Description

round Up To

License

Mozilla Public License

Declaration

public static int roundUpTo(int a, int quanta) 

Method Source Code

//package com.java2s;
//License from project: Mozilla Public License 

public class Main {
    public static int roundUpTo(int a, int quanta) { // works with pot quanta
        return (a + (quanta - 1)) & -quanta;
    }/*w w  w  .j  a  va2s  . c  om*/
}

Related

  1. roundUpPOT(int value)
  2. roundUpPow2(int x)
  3. roundUpPower2(int i)
  4. roundUpPower2(int v)
  5. roundUpTo(double in, double del)
  6. roundUpTo(long i, long multiple)
  7. roundUpTo100(int n)
  8. roundUpTo8(final long number)
  9. roundUpTo8(long val)