1 // the class that describes coordinates the velocity of a plane
5 public class Velocity {
14 Velocity(double newX, double newY, double newZ) {
15 this.vector=new Point4d(newX, newY, newZ);
16 this.speed=this.horizSpeed();
19 public static Velocity copyOf(Velocity v) {
20 return new Velocity( v );
23 Velocity (Velocity v) {
24 this.vector=new Point4d (v.vector);
25 this.speed=this.horizSpeed();
28 public double horizSpeed() {
29 return Math.sqrt(Math.pow(vector.x,2.0)+Math.pow(vector.y,2.0));
32 public String toString() {
33 return vector.toString();