def VecT.dot
import bend-tensors@0.0.0.2/bend_tensors.bend as BendTensorsimport Base
572def VecT.dot(+n: Nat, a: VecT(n), b: VecT(n)) -> F32:
573 match n:
574 case 0n:
575 VecL{x} = a
576 VecL{y} = b
577 Vec4.dot(x, y)
578 case 1n+p:
579 VecN{al, ar} = a
580 VecN{bl, br} = b
581 l r = VecT.dot(p, al, bl) VecT.dot(p, ar, br)
582 (l + r : F32)