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