Пример #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];
 }
Пример #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];
 }
Пример #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();
        }
Пример #4
0
 private void btnUnitario_Click(object sender, EventArgs e)
 {
     double[] unitVector = Vectorial.GetUnitVector(vectorR);
     txtVectorResultado.Text = unitVector[0] + ", " + unitVector[1] + ", " + unitVector[2];
 }
Пример #5
0
 private void btnMagnitud_Click(object sender, EventArgs e)
 {
     txtVectorResultado.Text = Vectorial.GetMagnitude(vectorR).ToString();
 }