Java Long Number Divide divideForMean(long sum, long count)

Here you can find the source of divideForMean(long sum, long count)

Description

Divides the sum by the count for an arithmetic mean.

License

Apache License

Declaration

private static long divideForMean(long sum, long count) 

Method Source Code

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

public class Main {
    /**//w ww .ja  va2s  . c o m
     * Divides the sum by the count for an arithmetic mean. If the count is 0, returns -1.
     */
    private static long divideForMean(long sum, long count) {
        return (count == 0) ? -1 : sum / count;
    }
}

Related

  1. divide(final long dividend, final long divisor)
  2. divide(Long d1, Long d2)
  3. divide(long dividend, long divisor)
  4. divide(long l1, long l2)
  5. divideAndRoundUp(long x, long y)
  6. divideLongBy1000(long l)
  7. divideLongs(Long a, Long b)
  8. divideZero(final long dividend, final long divisor, final long defaultDivisor)
  9. divWithRound(long p, long q)