Switch to edit mode.
Name(s): dot1: ":dot({ax, ay, az, ...}, {bx, by, bz, ...}) => ax*bx + ay*by + az*bz + ..."
2: {a, b} = args
3: length(a) == length(b) || raise(E_INVARG, "Both vectors must be have the same number of dimensions!")
4: "s = 0;"
5: s = 0.0
6: for x in [1..length(a)]
7: s = s + a[x] * b[x]
8: endfor
9: return s
10: "Last modified by Lao-Tzu (#8084) on Mon Dec 17 12:58:55 2001 MST."