MIN_GEOM_HASH_TOLERANCE

Constant MIN_GEOM_HASH_TOLERANCE 

Source
pub const MIN_GEOM_HASH_TOLERANCE: f64 = 1.0e-6;
Expand description

Floor on the quantization tolerance (GeometryHasher::new clamps any smaller request up to this).

plane_of‘s plane offset d = n·point is an i128 product of a quantized normal and a quantized corner, both scaled by 1/tolerance; it grows roughly as 1/tolerance². Measured on a georeferenced point (~2.6e6 m) and a 100 m triangle, tolerance = 1e-9 pushes d to ~1.6e38 — within a factor of ~1 of i128::MAX (1.7e38), i.e. one differently-shaped input away from overflow (debug builds panic, release wraps and two unrelated planes can alias to the same key). At this floor the same inputs land d around 1.6e26 — six orders of magnitude of headroom. It is also three orders of magnitude finer than the documented useful floor (~1 mm, the f32 precision limit of RTC-local coordinates — see the module docs’ “Tolerance-quantized” bullet), so no real caller loses precision by being clamped to it.