private void ComputeImperial() { double v1 = Convert.ToDouble(txtBox_avgAccV1.Text); double v2 = Convert.ToDouble(txtBox_avgAccV2.Text); double t = Convert.ToDouble(txtBox_avgAccT.Text); lbl_avgAccOut.Text = "" + Formulas.AverageAcceleration(v1, v2, t) + " f/s"; v1 = Convert.ToDouble(txtBox_fallAccV.Text); t = Convert.ToDouble(txtBox_fallAccT.Text); lbl_fallAccOut.Text = "" + Formulas.FallingAcceleration(v1, t) + " f/s"; v1 = Convert.ToDouble(txtBox_vertDistV.Text); t = Convert.ToDouble(txtBox_vertDistT.Text); lbl_projVertDistOut.Text = "" + Formulas.ProjectileVerticalDistance(v1, t) + " f"; v1 = Convert.ToDouble(txtBox_horzDistV.Text); t = Convert.ToDouble(txtBox_horzDistT.Text); lbl_projHorzDistOut.Text = "" + Formulas.ProjectileHorizontalDistance(v1, t) + " f"; v1 = Convert.ToDouble(txtBox_vertVelV.Text); t = Convert.ToDouble(txtBox_vertVelT.Text); lbl_projVertVelOut.Text = "" + Formulas.ProjectileVerticalVelocity(v1, t) + " f/s"; }
public override double ProjectileVerticalVelocity(double velocity, double time) { velocity = velocity * FOOT_PER_METER; return(Formulas.ProjectileVerticalVelocity(velocity, time) * METER_PER_FOOT); }
public override double ProjectileHorizontalDistance(double velocity, double time) { // Will also work as is. return(Formulas.ProjectileHorizontalDistance(velocity, time)); }
public override double FallingAcceleration(double velocityStart, double time) { velocityStart = velocityStart * FOOT_PER_METER; return(Formulas.FallingAcceleration(velocityStart, time) * METER_PER_FOOT); }
public override double AverageAcceleration(double velocityOne, double velocityTwo, double time) { // It will work as is. return(Formulas.AverageAcceleration(velocityOne, velocityTwo, time)); }