Java Number Sum sumMinMax(int a, int b)

Here you can find the source of sumMinMax(int a, int b)

Description

sum Min Max

License

Open Source License

Declaration

public static int sumMinMax(int a, int b) 

Method Source Code

//package com.java2s;
/*/*from ww  w  .  ja  v a 2s .  co m*/
 * Theme Builder for ExtJS framework Project.
 *
 * Copyright (c) 2009 - 2011 Sergey Chentsov. All rights reserved.
 *
 * License: LGPL_v3
 * Author: Sergey Chentsov (extjs id: iv_ekker)
 * mailto: sergchentsov@gmail.com
 */

public class Main {
    public static int sumMinMax(int a, int b) {
        int localSum = a + b;
        return localSum < 0 ? 0 : (localSum > 255 ? 255 : localSum);
    }
}

Related

  1. sumLogProb(double a, double b)
  2. summarize(String longString, int limit)
  3. summarizeCigarString(String cigarString)
  4. summary(String text)
  5. summatory(int value)
  6. sumNforOddIndices(long n)
  7. sumOfCollectionDouble(Iterable doubleIterable)
  8. sumOfDigits(long n)
  9. sumOfProperDivisors(long num)