def Vec3.cross

bend-prot@0.1.0.0 · geom.bend:40

import bend-prot@0.1.0.0/geom.bend as Geom
import Base

40def Vec3.cross(+a: Vec3, +b: Vec3) -> Vec3:
41  match a b:
42    case V3{+ax, +ay, +az} V3{+bx, +by, +bz}:
43      V3{((ay * bz : F32) - (az * by : F32) : F32), ((az * bx : F32) - (ax * bz : F32) : F32), ((ax * by : F32) - (ay * bx : F32) : F32)}

Uses (4)

Used by (1)