public class MotionMath extends Object
| Modifier and Type | Method and Description |
|---|---|
static double |
calcDuration(double v1,
double v2,
double accel)
Calculate the time it takes to accelerate (or decelerate) from the
initial velocity to the end velocity.
|
static double |
calcDuration(double v1,
double v2,
double accel,
double distance)
Calculate the time it takes to accelerate (or decelerate) from the
initial velocity to the end velocity.
|
static double |
calcEndVelocity(double v1,
double accel,
double dist)
Calculate the velocity after accelerating for a given distance, starting
with a given velocity.
|
public static double calcEndVelocity(double v1,
double accel,
double dist)
v1 - the initial velocityaccel - the (constant) accelerationdist - the distance traveledpublic static double calcDuration(double v1,
double v2,
double accel)
v1 - the initial velocityv2 - the end velocityaccel - the accelerationpublic static double calcDuration(double v1,
double v2,
double accel,
double distance)
v1 - the initial velocityv2 - the end velocityaccel - the accelerationdistance - the distance traveledCopyright © 2013. All rights reserved.