Here you can find the source of max(double a, double b, double c, double d)
Parameter | Description |
---|---|
a | First number to find largest among. |
b | Second number to find largest among. |
c | Third number to find largest among. |
d | Fourth number to find largest among. |
private static double max(double a, double b, double c, double d)
//package com.java2s; //License from project: Apache License public class Main { /**// w w w . j a va 2 s. co m * Return largest of four numbers. * * @param a First number to find largest among. * @param b Second number to find largest among. * @param c Third number to find largest among. * @param d Fourth number to find largest among. * @return Largest of a, b, c and d. */ private static double max(double a, double b, double c, double d) { return Math.max(Math.max(a, b), Math.max(c, d)); } }