(a: Vec3, b: Vec3)
| 86 | } |
| 87 | |
| 88 | export function vec3Cross(a: Vec3, b: Vec3): Vec3 { |
| 89 | return { |
| 90 | x: a.y * b.z - a.z * b.y, |
| 91 | y: a.z * b.x - a.x * b.z, |
| 92 | z: a.x * b.y - a.y * b.x, |
| 93 | }; |
| 94 | } |
| 95 | |
| 96 | export function vec3Distance(a: Vec3, b: Vec3): number { |
| 97 | const dx = b.x - a.x, dy = b.y - a.y, dz = b.z - a.z; |
no outgoing calls
no test coverage detected