Note to myself

This commit is contained in:
numzero 2024-04-20 18:47:40 +03:00
parent a4ea2977ce
commit 264601b8c7

View File

@ -154,6 +154,6 @@ fn main() -> io::Result<()> {
} }
fn edge_dist(a: Vec3, b: Vec3, base: Vec3, dir: Vec3) -> f32 { fn edge_dist(a: Vec3, b: Vec3, base: Vec3, dir: Vec3) -> f32 {
Mat3 { c0: b - a, c1: base - a, c2: dir }.determinant() // Note: given that the input is not arbitrary but comes from a cartesian product of certain (a, b) pairs and certain (base, dir) pairs, this can be optimized from Cnm to an+bm+cnm with c<C.
Mat3 { c0: b - a, c1: base - a, c2: -dir }.determinant() Mat3 { c0: b - a, c1: base - a, c2: -dir }.determinant()
} }