sin Sum From haversine - Java java.lang

Java examples for java.lang:Math Trigonometric Function

Description

sin Sum From haversine

Demo Code


//package com.java2s;
import static java.lang.Math.*;

public class Main {
    static double sinSumFromHav(double x, double y) {
        double a = sqrt(x * (1 - x));
        double b = sqrt(y * (1 - y));
        return 2 * (a + b - 2 * (a * y + b * x));
    }//from   w ww .java  2 s. c o m
}

Related Tutorials