Java examples for java.lang:Math Trigonometric Function
Computes arccosine for some cos(x).
//package com.java2s; public class Main { public static void main(String[] argv) throws Exception { double deg = 2.45678; System.out.println(acos(deg)); }//w w w . j a v a 2s. co m /** * Computes arccosine for some cos(x). * @param deg cos(x) * @return The angle represented by arccos(cos(x)) in degrees. */ public static final double acos(double deg) { return Math.toDegrees(Math.acos(deg)); } }