TNT blog |
|
|||
日歷
統(tǒng)計(jì)
導(dǎo)航常用鏈接留言簿(2)隨筆分類(lèi)隨筆檔案文章分類(lèi)
文章檔案
收藏夾home搜索最新隨筆最新評(píng)論
閱讀排行榜 |
Math.PI 記錄的圓周率
Math.E 記錄e的常量 Math中還有一些類(lèi)似的常量,都是一些工程數(shù)學(xué)常用量。 Math.abs 求絕對(duì)值 Math.sin 正弦函數(shù) Math.asin 反正弦函數(shù) Math.cos 余弦函數(shù) Math.acos 反余弦函數(shù) Math.tan 正切函數(shù) Math.atan 反正切函數(shù) Math.atan2 商的反正切函數(shù) Math.toDegrees 弧度轉(zhuǎn)化為角度 Math.toRadians 角度轉(zhuǎn)化為弧度 Math.ceil 得到不小于某數(shù)的最大整數(shù) Math.floor 得到不大于某數(shù)的最大整數(shù) Math.IEEEremainder 求余 Math.max 求兩數(shù)中最大 Math.min 求兩數(shù)中最小 Math.sqrt 求開(kāi)方 Math.pow 求某數(shù)的任意次方, 拋出ArithmeticException處理溢出異常 Math.exp 求e的任意次方 Math.log10 以10為底的對(duì)數(shù) Math.log 自然對(duì)數(shù) Math.rint 求距離某數(shù)最近的整數(shù)(可能比某數(shù)大,也可能比它小) Math.round 同上,返回int型或者long型(上一個(gè)函數(shù)返回double型) Math.random 返回0,1之間的一個(gè)隨機(jī)數(shù)
|
![]() |
|
Copyright © TNT | Powered by: 博客園 模板提供:滬江博客 |