Data update
This commit is contained in:
parent
ed705008a8
commit
0df55f9f24
2196 changed files with 32999 additions and 3075 deletions
20
Task/Vector-products/EasyLang/vector-products.easy
Normal file
20
Task/Vector-products/EasyLang/vector-products.easy
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
func vdot a[] b[] .
|
||||
for i to len a[]
|
||||
r += a[i] * b[i]
|
||||
.
|
||||
return r
|
||||
.
|
||||
func[] vcross a[] b[] .
|
||||
r[] &= a[2] * b[3] - a[3] * b[2]
|
||||
r[] &= a[3] * b[1] - a[1] * b[3]
|
||||
r[] &= a[1] * b[2] - a[2] * b[1]
|
||||
return r[]
|
||||
.
|
||||
a[] = [ 3 4 5 ]
|
||||
b[] = [ 4 3 5 ]
|
||||
c[] = [ -5 -12 -13 ]
|
||||
#
|
||||
print vdot a[] b[]
|
||||
print vcross a[] b[]
|
||||
print vdot a[] vcross b[] c[]
|
||||
print vcross a[] vcross b[] c[]
|
||||
Loading…
Add table
Add a link
Reference in a new issue