fn default_method_count(num_methods: usize, len_range: &ops::Range<usize>) -> ops::Range<usize> {
    let min_f32 = len_range.start as f32 / num_methods as f32 * (1.0 - METHOD_BALANCE_ALLOWANCE);
    let max_f32 = len_range.end as f32 / num_methods as f32 * (1.0 + METHOD_BALANCE_ALLOWANCE);
    // + 1 because the `method_count` is an **inclusive** range
    (min_f32.floor() as usize)..(max_f32.ceil() as usize + 1)
}
/// Determine a suitable default range in which method counts must lie, thus enforcing decent
/// method balance.
Determine a suitable default range in which method counts must lie, thus enforcing decent
method balance.
Determine a suitable default range in which method counts must lie thus enforcing decent method balance .
fn default_method_count(num_methods: usize, len_range: &ops::Range<usize>) -> ops::Range<usize> {
    let min_f32 = len_range.start as f32 / num_methods as f32 * (1.0 - METHOD_BALANCE_ALLOWANCE);
    let max_f32 = len_range.end as f32 / num_methods as f32 * (1.0 + METHOD_BALANCE_ALLOWANCE);
    // + 1 because the `method_count` is an **inclusive** range
    (min_f32.floor() as usize)..(max_f32.ceil() as usize + 1)
}
fn default_method_count ( num_methods : usize , len_range : & ops :: Range < usize > ) -> ops :: Range < usize > { let min_f32 = len_range . start as f32 / num_methods as f32 * ( 1.0 - METHOD_BALANCE_ALLOWANCE ) ; let max_f32 = len_range . end as f32 / num_methods as f32 * ( 1.0 + METHOD_BALANCE_ALLOWANCE ) ; // + 1 because the `method_count` is an **inclusive** range ( min_f32 . floor ( ) as usize ) .. ( max_f32 . ceil ( ) as usize + 1 ) }
Determine a suitable default range in which method counts must lie, thus enforcing decent
method balance.
Determine a suitable default range in which method counts must lie thus enforcing decent method balance .
num_methods
usize
len_range
&ops::Range<usize>
num_methods
usize
len_range
&ops::Range<usize>