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

查看所有标签

Introduction to Computer Science Using Python

Introduction to Computer Science Using Python

Dierbach, Charles / 2012-12 / $ 133.62

Introduction to Computer Science Using Python: A Computational Problem-Solving Focus introduces students to programming and computational problem-solving via a back-to-basics, step-by-step, objects-la......一起来看看 《Introduction to Computer Science Using Python》 这本书的介绍吧!

RGB转16进制工具
RGB转16进制工具

RGB HEX 互转工具

MD5 加密
MD5 加密

MD5 加密工具

XML、JSON 在线转换
XML、JSON 在线转换

在线XML、JSON转换工具