Java Number Min Value min(int a, int b)

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

Description

min

License

Apache License

Declaration

public static int min(int a, int b) 

Method Source Code

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

public class Main {
    public static int min(int a, int b) {
        if (a < b)
            return a;
        else/*from  w  ww  .java  2  s.c  o  m*/
            return b;
    }

    public static double min(double a, double b) {
        if (a < b)
            return a;
        else
            return b;
    }

    public static int min(int a, int b, int c) {
        if (a < b) {
            if (a < c)
                return a;
            else
                return c;
        } else {
            if (b < c)
                return b;
            else
                return c;
        }
    }

    public static double min(double a, double b, double c) {
        if (a < b) {
            if (a < c)
                return a;
            else
                return c;
        } else {
            if (b < c)
                return b;
            else
                return c;
        }
    }
}

Related

  1. min(float a, float b, float c, float d, float e)
  2. min(float dirOffset, float min, float max)
  3. min(float value1, float value2)
  4. min(float value1, float value2)
  5. min(float x0, float x1)
  6. min(int a, int b)
  7. min(int a, int b)
  8. min(int a, int b)
  9. min(int a, int b)