Skip to main content

phase_partition

Function phase_partition 

Source
fn phase_partition(v: f64, width: f64, partitions: usize) -> Option<usize>
Expand description

Which phase partition a voxel falls in, or None if it has no usable phase.

Clamped rather than asserted: the caller is documented to supply phase in [-π, π], and exactly +π would otherwise fall off the end of the last bin. Anything that strayed further out joins the nearest bin, which keeps the voxel in play — any region it lands in still merges on its measured phase differences.