Here you can find the source of avg(double v1, double v2)
public static double avg(double v1, double v2)
//package com.java2s; public class Main { public static double avg(double v1, double v2) { return (v1 + v2) / 2.; }//from ww w.ja va 2 s. c o m }