-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathTrig.java
More file actions
43 lines (41 loc) · 757 Bytes
/
Copy pathTrig.java
File metadata and controls
43 lines (41 loc) · 757 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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
package MyMath;
import java.util.*;
import java.lang.*;
//import java.util.Arrays;
//import java.util.Collections;
public class Trig
{
double angle;
double radian;
public Trig(){
this.angle = 0;
}
public void setAngle(double angle)
{
radian = Math.toRadians(angle);
}
public double sine()
{
return Math.sin(radian);
}
public double cosine()
{
return Math.cos(radian);
}
public double tangent()
{
return Math.tan(radian);
}
public double cotangent()
{
return 1/Math.tan(radian);
}
public double secant()
{
return 1/Math.sin(radian);
}
public double cosecant()
{
return 1/Math.cos(radian);
}
}