当前位置:网站首页>Number and math classes
Number and math classes
2022-07-04 11:12:00 【Rebith mysllf】
Java Of Math class
function : tangent (Math.tan())、 sine (Math.sin()) 、 cosine (Math.cos())、 angle (Math.PI/n)、Π(Math.PI)、 Arctangent representation
Java Of Number and Math Class method
| 1 | xxxValue() take Number Object to xxx Value of data type and return . |
|---|---|
| 2 | compareTo() take number Object and parameter comparison . |
| 3 | equals() Judge number Whether the object is equal to the parameter . |
| 4 | valueOf() Return to one Number Object specifies the built-in data type |
| 5 | toString() Returns the value as a string . |
| 6 | parseInt() Parse string to int type . |
| 7 | abs() Returns the absolute value of the parameter . |
| 8 | ceil() Return greater than or equal to ( >= ) The smallest integer of a given parameter , The type is double precision floating point . |
| 9 | floor() Return less than or equal to (<=) The maximum integer for a given parameter . |
| 10 | rint() Returns the integer closest to the parameter . The return type is double. |
| 11 | round() It said rounding , Algorithm for Math.floor(x+0.5), Add the original number 0.5 Then round down , therefore ,Math.round(11.5) As the result of the 12,Math.round(-11.5) As the result of the -11. |
| 12 | min() Returns the minimum of two parameters . |
| 13 | max() Returns the maximum of two parameters . |
| 14 | exp() Returns the base of a natural number e The parameter power of . |
| 15 | log() Returns the logarithm of the natural base of the parameter . |
| 16 | pow() Returns the second power of the first argument . |
| 17 | sqrt() Find the arithmetic square root of the parameter . |
| 18 | sin() Please specify double Sine of type parameter . |
| 19 | cos() Please specify double Cosine value of type parameter . |
| 20 | tan() Please specify double Tangent value of type parameter . |
| 21 | asin() Please specify double Arcsine value of type parameter . |
| 22 | acos() Please specify double The arccosine value of the type parameter . |
| 23 | atan() Please specify double Arctangent value of type parameter . |
| 24 | atan2() Convert Cartesian coordinates to polar coordinates , And return the angle value of polar coordinates . |
| 25 | toDegrees() Convert parameters to angles . |
| 26 | toRadians() Convert the Angle to radians . |
| 27 | random() Returns a random number . |
Math Of floor,round and ceil Method example comparison
| Parameters | Math.floor | Math.round | Math.ceil |
|---|---|---|---|
| 1.4 | 1 | 1 | 2 |
| 1.5 | 1 | 2 | 2 |
| 1.6 | 1 | 2 | 2 |
| -1.4 | -2 | -1 | -1 |
| -1.5 | -2 | -1 | -1 |
| -1.6 | -2 | -2 | -1 |
@copy Novice tutorial
Math as well as Number Methods of class can be called and run directly , Use the class name . Method name
边栏推荐
- Canoe the second simulation engineering xvehicle 3 CAPL programming (operation)
- 三立期货安全么?期货开户怎么开?目前期货手续费怎么降低?
- Canoe - the second simulation engineering - xvehicle - 2 panel design (operation)
- VPS installation virtualmin panel
- QQ one click cookie acquisition
- What if the book written is too popular? Author of "deep reinforcement learning" at Peking University: then open the download
- Elevator dispatching (pairing project) ④
- 20 kinds of hardware engineers must be aware of basic components | the latest update to 8.13
- 3W word will help you master the C language as soon as you get started - the latest update is up to 5.22
- [Galaxy Kirin V10] [server] iSCSI deployment
猜你喜欢

Using SA token to solve websocket handshake authentication

os. Path built-in module

Introduction to Lichuang EDA
![[Galaxy Kirin V10] [desktop] build NFS to realize disk sharing](/img/72/5e725a44a50f152b477a4b2907a2d0.jpg)
[Galaxy Kirin V10] [desktop] build NFS to realize disk sharing

Introduction to canoe automatic test system

2022 AAAI fellow release! Yan Shuicheng, chief scientist of sail, and Feng Yan, Professor of Hong Kong University of science and technology, were selected

Canoe - the third simulation project - bus simulation - 2 function introduction, network topology

Canoe - the third simulation project - bus simulation - 3-2 project implementation

Canoe test: two ways to create CAPL test module

Summary of collection: (to be updated)
随机推荐
Detailed array expansion analysis --- take you step by step analysis
Customized version of cacti host template
Appscan installation steps
Strings and characters
Article publishing experiment
Failed to configure a DataSource: ‘url‘ attribute is not specified... Bug solution
unit testing
Canoe - the third simulation project - bus simulation - 3-2 project implementation
20 kinds of hardware engineers must be aware of basic components | the latest update to 8.13
DNS hijacking
First article
Application of slice
Canoe - the third simulation project - bus simulation - 3-1 project implementation
For and while loops
os. Path built-in module
Dictionaries and collections
Terms related to hacker technology
Performance test method
Xiaobing · beauty appraisal
Interview and lecture summary 1