1 package JSci.physics; 2 3 8 public class ConstantTorque3D extends Torque3D { 9 protected final double Tx, Ty, Tz; 10 13 public ConstantTorque3D(double wx, double wy, double wz) { 14 Tx = wx; 15 Ty = wy; 16 Tz = wz; 17 } 18 21 public Torque3D add(ConstantTorque3D T) { 22 return new ConstantTorque3D(Tx+T.Tx, Ty+T.Ty, Tz+T.Tz); 23 } 24 27 public Torque3D subtract(ConstantTorque3D T) { 28 return new ConstantTorque3D(Tx-T.Tx, Ty-T.Ty, Tz-T.Tz); 29 } 30 public double getXComponent(double t) { 31 return Tx; 32 } 33 public double getYComponent(double t) { 34 return Ty; 35 } 36 public double getZComponent(double t) { 37 return Tz; 38 } 39 } 40 41 | Popular Tags |