Java Number Round roundToDimensions(int value, int nearestValue)

Here you can find the source of roundToDimensions(int value, int nearestValue)

Description

Round.

License

Open Source License

Declaration

public static int roundToDimensions(int value, int nearestValue) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    /**/*from w ww .jav  a2 s .c o  m*/
     * Round.
     */
    public static int roundToDimensions(int value, int nearestValue) {
        return Math.round(value / nearestValue) * nearestValue;
    }
}

Related

  1. roundToDecimals(double d, int percision)
  2. roundToDecimals(double doubleValue)
  3. roundToDecimals(double input, int places)
  4. roundToDefaultPrecision(final double value)
  5. roundToDimensions(int value, int f)
  6. roundToEight(long i)
  7. roundToHalf(float x)
  8. roundToInt(double d)
  9. roundToInt(double d)