Java Number Min Value minNot0(double i1, double i2)

Here you can find the source of minNot0(double i1, double i2)

Description

Get min reject -1

License

Apache License

Parameter

Parameter Description
i1 a parameter
i2 a parameter

Return

min reject -1

Declaration

public static double minNot0(double i1, double i2) 

Method Source Code

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

public class Main {
    /**/*from   www .  j  ava  2s . c om*/
     * Get min reject -1
     * @param i1
     * @param i2
     * @return min reject -1
     */
    public static double minNot0(double i1, double i2) {
        if (i1 == 0) {
            if (i2 > 0)
                return i2;
            else
                return 0;
        } else {
            if (i2 > 0 && i2 < i1)
                return i2;
            else
                return i1;
        }
    }

    public static double minNot0(double no1, double no2, double no3) {
        return minNot0(minNot0(no1, no2), no3);
    }
}

Related

  1. minMax(int val, int min, int max)
  2. minMax(int value, int min, int max)
  3. minMax(long x, long y, boolean max)
  4. minMaxInt(Long i1, String s, boolean max)
  5. minMaxNormalize(double min, double max, double value)
  6. minNotMinus1(int i1, int i2)
  7. minOfThree(final long a, final long b, final long c)
  8. minP(int a, long b)
  9. minPos(int a, int b)