Skip to main content

resolve_progress_target

Function resolve_progress_target 

Source
pub fn resolve_progress_target(
    per_mille: i32,
    chapter_offsets: &[usize],
    chapter_count: usize,
) -> (usize, usize)
Expand description

Map a progress-bar per-mille (0..1000) to a (chapter, local_offset) pair using the cumulative chapter-offset table.