// hopefully lift the `tol * tol` out of a loop
hopefully lift the `tol * tol` out of a loop
hopefully lift the ` tol * tol ` out of a loop
fn fracs_within(lattice: &Lattice, a: V3, b: V3, tol: f64) -> bool {
    let shortest_diff = (a - b).map(|x| x - x.round());
    let shortest_cart = shortest_diff * lattice;
    shortest_cart.sqnorm() < tol * tol
}
fn fracs_within ( lattice : & Lattice , a : V3 , b : V3 , tol : f64 ) -> bool { let shortest_diff = ( a - b ) . map ( | x | x - x . round ( ) ) ; let shortest_cart = shortest_diff * lattice ; shortest_cart . sqnorm ( ) < tol * tol }
hopefully lift the `tol * tol` out of a loop
hopefully lift the ` tol * tol ` out of a loop
lattice
&Lattice
a
V3
b
V3
tol
f64