diff --git a/src/main/java/resources/Acceleration.java b/src/main/java/resources/Acceleration.java index f7d33d4..69f1a18 100644 --- a/src/main/java/resources/Acceleration.java +++ b/src/main/java/resources/Acceleration.java @@ -2,30 +2,30 @@ public class Acceleration { private double massValue; - private Vector2 forceValue; + private Pair forceValue; private Velocity velocity; private Onground onground; - private Vector2 value; + private Pair value; public void updateByMass(double mass) { this.massValue = mass; - Vector2 temp_l0; + Pair temp_l0; if (this.onground.getOnground()) { - temp_l0 = new Vector2((forceValue.getX() / mass), 0.0); + temp_l0 = new Pair((forceValue.getFirst() / mass), 0.0); } else { - temp_l0 = new Vector2((forceValue.getX() / mass), (forceValue.getY() / mass)); + temp_l0 = new Pair((forceValue.getFirst() / mass), (forceValue.getSecond() / mass)); } value = temp_l0; velocity.updateByAcceleration(value); } - public void updateByForce(Vector2 force) { + public void updateByForce(Pair force) { this.forceValue = force; - Vector2 temp_l1; + Pair temp_l1; if (this.onground.getOnground()) { - temp_l1 = new Vector2((force.getX() / massValue), 0.0); + temp_l1 = new Pair((force.getFirst() / massValue), 0.0); } else { - temp_l1 = new Vector2((force.getX() / massValue), (force.getY() / massValue)); + temp_l1 = new Pair((force.getFirst() / massValue), (force.getSecond() / massValue)); } value = temp_l1; velocity.updateByAcceleration(value); @@ -36,7 +36,7 @@ this.onground = onground; } - public Vector2 getValue() { + public Pair getValue() { return value; } } \ No newline at end of file