Example #1
0
 private void btnCrossProduct_Click(object sender, EventArgs e)
 {
     double[] vectorA = { (double)numXa.Value, (double)numYa.Value, (double)numZa.Value };
     double[] vectorB = { (double)numXb.Value, (double)numYb.Value, (double)numZb.Value };
     vectorR = Vectorial.GetCrossProduct(vectorA, vectorB);
     txtVectorResultado.Text = vectorR[0] + ", " + vectorR[1] + ", " + vectorR[2];
 }
Example #2
0
 private void btnMinusVector_Click(object sender, EventArgs e)
 {
     double[] vectorA = { (double)numXa.Value, (double)numYa.Value, (double)numZa.Value };
     double[] vectorB = { (double)numXb.Value, (double)numYb.Value, (double)numZb.Value };
     vectorR = Vectorial.SubstractTwoVectors(vectorA, vectorB);
     txtVectorResultado.Text = vectorR[0] + ", " + vectorR[1] + ", " + vectorR[2];
 }
Example #3
0
        private void btnDotProduct_Click(object sender, EventArgs e)
        {
            double[] vectorA    = { (double)numXa.Value, (double)numYa.Value, (double)numZa.Value };
            double[] vectorB    = { (double)numXb.Value, (double)numYb.Value, (double)numZb.Value };
            double   dotProduct = Vectorial.GetDotProduct(vectorA, vectorB);

            txtVectorResultado.Text = dotProduct.ToString();
        }
Example #4
0
 private void btnUnitario_Click(object sender, EventArgs e)
 {
     double[] unitVector = Vectorial.GetUnitVector(vectorR);
     txtVectorResultado.Text = unitVector[0] + ", " + unitVector[1] + ", " + unitVector[2];
 }
Example #5
0
 private void btnMagnitud_Click(object sender, EventArgs e)
 {
     txtVectorResultado.Text = Vectorial.GetMagnitude(vectorR).ToString();
 }