博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
math asin_Java Math类静态double asin(double d)方法及示例
阅读量:2535 次
发布时间:2019-05-11

本文共 3352 字,大约阅读时间需要 11 分钟。

math asin

数学类静态double asin(double d) (Math Class static double asin(double d))

  • This method is available in java.lang package.

    此方法在java.lang包中可用。

  • This method is used to return the arc sine of the given parameter in the method.

    此方法用于返回方法中给定参数的反正弦值。

  • In this method, asin stands for arc sine of an angle.

    在这种方法中, asin代表一个角度的反正弦

  • This method is static so this method is accessible with classname too.

    此方法是静态的,因此也可以使用类名访问此方法。

  • The return type of this method is double that means it returns the arc sine of the given angle is of the double datatype.

    此方法的返回类型为double,这意味着它返回给定角度的反正弦为double数据类型。

  • In this method, we pass only one parameter as an argument in the method of Math class.

    在此方法中,我们仅将一个参数作为参数传递给Math类的方法。

  • In this method, we pass only radians type argument (i.e. First we convert given argument in radians by using toRadians() method of Math class then after we will pass the same variable in asin() method).

    在此方法中,我们仅传递弧度类型的参数(即,首先,通过使用Math类的toRadians()方法将给定的参数转换为弧度,然后在asin()方法中传递相同的变量)。

  • This method does not throw any exception.

    此方法不会引发任何异常。

  • In this method, the meaning of arc sine is the inverse or reverse sine of the given argument.

    在此方法中,反正弦的含义是给定参数的反正弦或反正弦。

  • The range of asin() lies –PI/2 through PI/2.

    asin()的范围介于–PI / 2PI / 2之间

Syntax:

句法:

public static double asin(double d){    }

Parameter(s):

参数:

double d – It's the value of an angle in radians.

double d –以弧度为单位的角度值。

Note:

注意:

  • If we pass "NaN" (Not A Number) to the function, it returns "NaN".

    如果我们将“ NaN”(非数字)传递给函数,它将返回“ NaN”。

  • If we pass the value whose absolute value is greater than 1, it returns "NaN".

    如果我们传递的绝对值大于1的值,则返回“ NaN”。

Return value:

返回值:

The return type of this method is double, it returns the arc sine of the given angle.

此方法的返回类型为double ,它返回给定角度的反正弦值。

Java程序演示acos(double d)方法的示例 (Java program to demonstrate example of acos(double d) method)

// Java program to demonstrate the behavior of  // acos(double d) method of Math Class.class AcosMethod {
public static void main(String[] args) {
// Here we are declaring few variables double a1 = 100; double a2 = Math.PI / 2; // Display previous value of a1 and a2 System.out.println(" Before implementing acos() so the value of a1 is :" + a1); System.out.println(" Before implementing acos() so the value of a2 is :" + a2); // Here , we will get NaN because we are passing parameter // whose absolute value is greater than 1 System.out.println("After implementing acos() so the value of a1 is :" + Math.acos(a1)); // By using toRadians() method is used to convert // absolute to radians a2 = Math.toRadians(a2); // Display the value of a2 in radians form System.out.println("After implementing toRadians() so the value of a2 is :" + a2); // Here we will find arc cosine of a2 by using acos() method System.out.println("After implementing acos() so the value of a2 is :" + Math.acos(a2)); }}

Output

输出量

E:\Programs>javac AcosMethod.javaE:\Programs>java AcosMethodBefore implementing acos() so the value of a1 is :100.0Before implementing acos() so the value of a2 is :1.5707963267948966After implementing acos() so the value of a1 is :NaNAfter implementing toRadians() so the value of a2 is :0.027415567780803774After implementing acos() so the value of a2 is :1.5433773235341761

翻译自:

math asin

转载地址:http://vkvzd.baihongyu.com/

你可能感兴趣的文章
小D课堂 - 新版本微服务springcloud+Docker教程_6-01 微服务网关介绍和使用场景
查看>>
小D课堂 - 新版本微服务springcloud+Docker教程_5-05熔断降级服务异常报警通知
查看>>
小D课堂 - 新版本微服务springcloud+Docker教程_6-03 高级篇幅之zuul常用问题分析
查看>>
小D课堂 - 新版本微服务springcloud+Docker教程_5-08 断路器监控仪表参数
查看>>
小D课堂 - 新版本微服务springcloud+Docker教程_6-02 springcloud网关组件zuul
查看>>
小D课堂-SpringBoot 2.x微信支付在线教育网站项目实战_2-1.快速搭建SpringBoot项目,采用Eclipse...
查看>>
小D课堂-SpringBoot 2.x微信支付在线教育网站项目实战_1-4.在线教育后台数据库设计...
查看>>
小D课堂-SpringBoot 2.x微信支付在线教育网站项目实战_2-3.热部署在Eclipse和IDE里面的使用...
查看>>
小D课堂-SpringBoot 2.x微信支付在线教育网站项目实战_1-3.在线教育站点需求分析和架构设计...
查看>>
小D课堂-SpringBoot 2.x微信支付在线教育网站项目实战_2-4.后端项目分层分包及资源文件处理...
查看>>
小D课堂-SpringBoot 2.x微信支付在线教育网站项目实战_2-2.快速搭建SpringBoot项目,采用IDEA...
查看>>
小D课堂-SpringBoot 2.x微信支付在线教育网站项目实战_3-5.PageHelper分页插件使用
查看>>
小D课堂-SpringBoot 2.x微信支付在线教育网站项目实战_5-6.微信扫码登录回调本地域名映射工具Ngrock...
查看>>
小D课堂-SpringBoot 2.x微信支付在线教育网站项目实战_5-8.用户模块开发之保存微信用户信息...
查看>>
Linux下Nginx安装
查看>>
LVM扩容之xfs文件系统
查看>>
Hbase记录-client访问zookeeper大量断开以及参数调优分析(转载)
查看>>
代码片段收集
查看>>
vue-cli3创建项目时报错
查看>>
输入1-53周,输出1-53周的开始时间和结束时间
查看>>