Java asin() 方法
Java 教程
· 2019-02-08 14:58:29
asin() 方法用于返回指定double类型参数的反正弦值。
语法
double asin(double d)
参数
d -- 任何原生数据类型。
返回值
返回指定double类型参数的反正弦值。
实例
public class Test{
public static void main(String args[]){
double degrees = 45.0;
double radians = Math.toRadians(degrees);
System.out.format("pi 的值为 %.4f%n", Math.PI);
System.out.format("%.4f 的反正弦值为 %.4f 度 %n", Math.sin(radians), Math.toDegrees(Math.asin(Math.sin(radians))));
}
}
编译以上程序,输出结果为:
pi 的值为 3.1416 0.7071 的反正弦值为 45.0000 度
点击查看所有 Java 教程 文章: https://www.codercto.com/courses/l/12.html
Practical Algorithms for Programmers
Andrew Binstock、John Rex / Addison-Wesley Professional / 1995-06-29 / USD 39.99
Most algorithm books today are either academic textbooks or rehashes of the same tired set of algorithms. Practical Algorithms for Programmers is the first book to give complete code implementations o......一起来看看 《Practical Algorithms for Programmers》 这本书的介绍吧!