haversine From Sin - Java java.lang

Java examples for java.lang:Math Trigonometric Function

Description

haversine From Sin

Demo Code


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

public class Main {
    static double havFromSin(double x) {
        double x2 = x * x;
        return x2 / (1 + sqrt(1 - x2)) * .5;
    }/*  w ww  .  j a  v a  2s . c  o  m*/
}

Related Tutorials