Java Array Average average(final int totalAmount, final int orderCount)

Here you can find the source of average(final int totalAmount, final int orderCount)

Description

average

License

Apache License

Declaration

public static int average(final int totalAmount, final int orderCount) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    public static int average(final int totalAmount, final int orderCount) {
        return orderCount == 0 ? 0 : Math
                .round((100.0f * totalAmount / orderCount) / 100);
    }/*w  ww . j a va 2 s  .  c  om*/
}

Related

  1. average(double[] values)
  2. average(double[] values)
  3. average(final double[] values)
  4. average(final Float... values)
  5. average(final float[] values)
  6. average(final T p_num1, final T p_num2)
  7. average(float[][] data, int startIndex, int endIndex)
  8. average(float[][] originalValues, float[][] newValues, int[] indexArray)
  9. average(int argb0, int argb1)