MCPcopy Create free account
hub / github.com/Bloom-Engine/engine / vec3Cross

Function vec3Cross

src/math/index.ts:88–94  ·  view source on GitHub ↗
(a: Vec3, b: Vec3)

Source from the content-addressed store, hash-verified

86}
87
88export 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
96export function vec3Distance(a: Vec3, b: Vec3): number {
97 const dx = b.x - a.x, dy = b.y - a.y, dz = b.z - a.z;

Callers 1

rayIntersectsTriangleFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected