日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程语言 > java >内容正文

java

java math.cos_Java Math类静态double cos(double d)示例

發(fā)布時間:2023/12/1 java 27 豆豆
生活随笔 收集整理的這篇文章主要介紹了 java math.cos_Java Math类静态double cos(double d)示例 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

java math.cos

數(shù)學類靜態(tài)雙cos(double d) (Math Class static double cos(double d))

  • This method is available in java.lang package.

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

  • This method is used to return the trigonometric cosine of an angle of the given parameter in the method.?

    此方法用于返回該方法中給定參數(shù)的角度的三角余弦。

  • In this method, cos stands for cosine of an angle.

    在此方法中,cos代表角度的余弦。

  • This is a static method so this method is accessible with the class name too.?

    這是一個靜態(tài)方法,因此也可以使用類名訪問此方法。

  • The return type of this method is double that means it returns the?cosine value of the given angle and the value is of double type.?

    此方法的返回類型是double,這意味著它將返回給定角度的余弦值,并且該值是double類型。

  • In this method, we pass only one parameter as an argument in the method of Math class and the given parameter is those parameters for which we have to find the cosine of an angle.?

    在此方法中,我們僅將一個參數(shù)作為參數(shù)傳遞給Math類的方法,并且給定參數(shù)是那些我們必須找到角度的余弦值的參數(shù)。

  • 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 cos() method).?

    在此方法中,我們僅傳遞弧度類型的參數(shù)(即,首先,我們使用Math類的toRadians()方法將給定參數(shù)轉換為弧度,然后在cos()方法中傳遞相同的變量)。

  • This method does not throw any exception.

    此方法不會引發(fā)任何異常。

Syntax:

句法:

public static double cos(double d){}

Parameter(s):

參數(shù):

double d – A double value (angle) whose cosine value to be found.

double d –要查找其余弦值的雙精度值(角度)。

Note:

注意:

  • If we pass "NaN", it returns "NaN".

    如果我們傳遞“ NaN”,則返回“ NaN”。

  • If we pass an infinity, it returns "NaN".

    如果傳遞無窮大,則返回“ NaN”。

Return value:

返回值:

The return type of this method is double, it returns the cosine value of the given angle.

此方法的返回類型為double ,它返回給定角度的余弦值。

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

// Java program to demonstrate the exammple of cos(double d) // method of Math Classclass CosMethod {public static void main(String[] args) {// Here we are declaring few variablesdouble d1 = 7.0 / 0.0;double d2 = -7.0 / 0.0;double d3 = 60.0;// Display previous value of d1,d2 and d3System.out.println(" Before implementing cos() so the value of d1 is :" + d1);System.out.println(" Before implementing cos() so the value of d2 is :" + d2);System.out.println(" Before implementing cos() so the value of d3 is :" + d3);// By using toRadians() method to convert // absolute value into radiansd1 = Math.toRadians(d1);d2 = Math.toRadians(d2);d3 = Math.toRadians(d3);// Here , we will get (NaN) because we are passing // parameter whose value is (infinity)System.out.println("After implementing cos() so the value of d1 is :" + Math.cos(d1));// Here , we will get (NaN) because we are passing // parameter whose value is (-infinity)System.out.println("After implementing cos() so the value of d2 is :" + Math.cos(d2));// Here we will find cosine of d3 by using cos() methodSystem.out.println("After implementing cos() so the value of d3 is :" + Math.cos(d3));} }

Output

輸出量

E:\Programs>javac AtanMethod.javaE:\Programs>java AtanMethod Before implementing cos() so the value of d1 is :Infinity Before implementing cos() so the value of d2 is :-Infinity Before implementing cos() so the value of d3 is :60.0After implementing cos() so the value of d1 is :NaN After implementing cos() so the value of d2 is :NaN After implementing cos() so the value of d3 is :0.5000000000000001

翻譯自: https://www.includehelp.com/java/math-class-static-double-cos-double-d-with-example.aspx

java math.cos

總結

以上是生活随笔為你收集整理的java math.cos_Java Math类静态double cos(double d)示例的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。

主站蜘蛛池模板: 国产精品一区二区三区免费观看 | 亚洲网在线观看 | 在线视频在线观看 | 国产超91 | 热久久精品免费视频 | 色哟哟视频在线观看 | 一起艹在线观看 | 国产一区二区三区四区三区四 | 中文一区视频 | 久操精品视频 | 黄色免费网站在线看 | www.日日| 国产真实交换夫妇视频 | 久操青青 | 亚洲精品在线免费播放 | 污视频导航 | 国产精品无码AV | 黄色在线小视频 | 骚虎视频在线观看 | 精品少妇白浆小泬60P | 禁片天堂 | 日本肉体xxxx裸体137大胆图 | 日韩有码一区二区三区 | 这里只有精品久久 | 久久久久久免费 | 在线视频你懂得 | 91成人天堂久久成人 | 第一区免费在线观看 | 少妇高潮久久久 | www.黄色在线 | 男人天堂久久 | 啪啪免费视频网站 | 国产精品免费一区二区 | 玖草在线观看 | 欧美在线网址 | 北条麻妃一区二区三区在线观看 | 亚洲一级大片 | 国产精品久久一区二区三区动 | 亚洲欧美一区二区精品久久久 | 粉色视频免费观看 | 天堂男人在线 | 亚洲Av无码成人精品区伊人 | 日本不卡一二 | 精品国产污污免费网站入口 | 日韩免费观看 | 亚洲国产一区二区在线 | 欧美黄视频在线观看 | 免费av高清| 亚洲第一国产视频 | 国产精品二区在线观看 | 亚洲最大网站 | 国产一级免费av | 久久久99精品国产一区二区三区 | 自慰无码一区二区三区 | 日韩亚洲国产精品 | 狠狠躁夜夜躁人人爽视频 | 一极黄色大片 | 91打屁股| 国产一级大片在线观看 | 在线免费av网址 | 国产日产精品一区二区 | 蜜桃精品视频在线 | 亚洲va国产天堂va久久 en | www.伊人网 | 99视频| 国产精品 欧美 日韩 | 香蕉成视频人app下载安装 | 青青草免费观看视频 | 欧美性猛交xxxx乱大交蜜桃 | 日韩成人黄色片 | 清清草免费视频 | 嫩草大剧院 | 久久香蕉综合 | 亚洲精品专区 | 国产黄色电影 | 中国美女性猛交 | 综合网亚洲 | 成人免费在线播放视频 | 欧美日韩小说 | 毛片随便看 | av在线观 | 精品人妻一区二区三区潮喷在线 | 成人免费一区二区 | javxxx| 国产50页| 日本爽爽爽爽爽爽在线观看免 | 成人动漫av | 999精品视频 | 日本不卡一区在线观看 | 538国产精品视频一区二区 | 少妇做爰k8经典 | 手机看片福利视频 | 一区二区视频国产 | 五月天婷婷激情网 | 久久成人久久爱 | 性网爆门事件集合av | 成人污在线观看 | 国产精品100 | 国产丝袜美女 |