-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMathMethods.java
More file actions
24 lines (20 loc) · 826 Bytes
/
MathMethods.java
File metadata and controls
24 lines (20 loc) · 826 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package com.company;
public class MathMethods {
public static void main(String[] args) {
byte a = 12;
int b = 45;
long c = 78;
float d = 45.26f;
double e = 45.987;
double h = 60.00;
double m = Math.pow(a,0.5); // Under root maths problem
int k = Math.abs(a); // Return absolute value in int and float and double and long
double n =Math.PI * 7; // Pie value
double l = Math.cbrt(e); // Returns cube root
double w = Math.ceil(e); // Returns round closest figure
double s = Math.sin(e); // Trigonometric sin
double f = Math.cos(e); // Trigonometric cos
double z = Math.tan(e); // Trigonometric tan
double v = Math.round(e); // Gives round value in the decimals
}
}