-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApplication.java
More file actions
41 lines (30 loc) · 1 KB
/
Application.java
File metadata and controls
41 lines (30 loc) · 1 KB
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
public class Application
{
public static void play(Particle obj)
{
double x = 0;
//Math math = new Math(1,1);
while( x<1 )
{
System.out.println(" ");
//System.out.println("Time Step = " + x);
Phsyics.moveX(obj, x);
obj.setVectMag(obj.getVectMag()-1);
System.out.println(x + " "+ obj.getVectMag());
//System.out.println("particle Pos y = " + obj.getPosY());
x += .1;
}
}
public static void main(String[] args)
{
double vectorMag = 299792458.0;
double vectorAngle = 0.0;
Particle obj = new Particle(vectorMag,vectorAngle);
System.out.println("vector magnitude: " + vectorMag);
System.out.println("vector angle: " + vectorAngle);
System.out.println("particle position: " + obj.getPosX());
System.out.println(" ");
play(obj);
System.out.println("hello");
}
}