Java Number Round roundInventorySize(final int size)

Here you can find the source of roundInventorySize(final int size)

Description

round Inventory Size

License

Open Source License

Declaration

@Deprecated
    public static int roundInventorySize(final int size) 

Method Source Code

//package com.java2s;

public class Main {
    @Deprecated
    public static int roundInventorySize(final int size) {
        if (size > 9 && size <= 18) {
            return 18;
        } else if (size > 18 && size <= 27) {
            return 27;
        } else if (size > 27 && size <= 36) {
            return 36;
        } else if (size > 36 && size <= 45) {
            return 45;
        } else if (size > 45) {
            return 54;
        }// w  w w .  ja v a 2 s .  com

        return 9;
    }
}

Related

  1. roundIfClose(double val)
  2. Rounding(double d, int i)
  3. rounding(double val)
  4. roundingRightShift(int x, int count)
  5. roundIntegerToNearestUpperTenth(int a)
  6. roundJs(double v, int n)
  7. roundLong(double a)
  8. roundM(int n, int m)
  9. roundMinAndMax(double min, double max, int tickCount)