Exemplo n.º 1
0
        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";
        }
Exemplo n.º 2
0
 public override double ProjectileHorizontalDistance(double velocity, double time)
 {
     // Will also work as is.
     return(Formulas.ProjectileHorizontalDistance(velocity, time));
 }