Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
16
Task/Vector-products/MiniScript/vector-products.mini
Normal file
16
Task/Vector-products/MiniScript/vector-products.mini
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
vectorA = [3, 4, 5]
|
||||
vectorB = [4, 3, 5]
|
||||
vectorC = [-5, -12, -13]
|
||||
|
||||
dotProduct = function(x, y)
|
||||
return x[0]*y[0] + x[1]*y[1] + x[2]*y[2]
|
||||
end function
|
||||
|
||||
crossProduct = function(x, y)
|
||||
return [x[1]*y[2] - x[2]*y[1], x[2]*y[0] - x[0]*y[2], x[0]*y[1] - x[1]*y[0]]
|
||||
end function
|
||||
|
||||
print "Dot Product = " + dotProduct(vectorA, vectorB)
|
||||
print "Cross Product = " + crossProduct(vectorA, vectorB)
|
||||
print "Scalar Triple Product = " + dotProduct(vectorA, crossProduct(vectorB,vectorC))
|
||||
print "Vector Triple Product = " + crossProduct(vectorA, crossProduct(vectorB,vectorC))
|
||||
Loading…
Add table
Add a link
Reference in a new issue