fn adjust_limits(typeinfo: &TypeInfo, old_lower_limit: f64, old_upper_limit: f64) -> (f64, f64) {
    let (mut new_lower_limit, mut new_upper_limit) = get_type_limits(typeinfo, old_lower_limit, old_upper_limit);

    // if non-zero limits exist, then the limits can only shrink, but not grow
    // if the limits are both zero, then the maximum range allowed by the datatype is used
    if old_lower_limit != 0f64 || old_upper_limit != 0f64 {
        if new_lower_limit < old_lower_limit {
            new_lower_limit = old_lower_limit;
        }
        if new_upper_limit > old_upper_limit {
            new_upper_limit = old_upper_limit;
        }
    }

    (new_lower_limit, new_upper_limit)
}
// generate adjuste min and max limits based on the datatype.
// since the updater code has no knowledge how the data is handled in the application it
// is only possible to shrink existing limits, but not expand them
generate adjuste min and max limits based on the datatype.
since the updater code has no knowledge how the data is handled in the application it
is only possible to shrink existing limits, but not expand them
generate adjuste min and max limits based on the datatype . since the updater code has no knowledge how the data is handled in the application it is only possible to shrink existing limits but not expand them
fn adjust_limits(typeinfo: &TypeInfo, old_lower_limit: f64, old_upper_limit: f64) -> (f64, f64) {
    let (mut new_lower_limit, mut new_upper_limit) = get_type_limits(typeinfo, old_lower_limit, old_upper_limit);
    // if non-zero limits exist, then the limits can only shrink, but not grow
    // if the limits are both zero, then the maximum range allowed by the datatype is used
    if old_lower_limit != 0f64 || old_upper_limit != 0f64 {
        if new_lower_limit < old_lower_limit {
            new_lower_limit = old_lower_limit;
        }
        if new_upper_limit > old_upper_limit {
            new_upper_limit = old_upper_limit;
        }
    }
    (new_lower_limit, new_upper_limit)
}
fn adjust_limits ( typeinfo : & TypeInfo , old_lower_limit : f64 , old_upper_limit : f64 ) -> ( f64 , f64 ) { let ( mut new_lower_limit , mut new_upper_limit ) = get_type_limits ( typeinfo , old_lower_limit , old_upper_limit ) ; // if non-zero limits exist, then the limits can only shrink, but not grow // if the limits are both zero, then the maximum range allowed by the datatype is used if old_lower_limit != 0f64 || old_upper_limit != 0f64 { if new_lower_limit < old_lower_limit { new_lower_limit = old_lower_limit ; } if new_upper_limit > old_upper_limit { new_upper_limit = old_upper_limit ; } } ( new_lower_limit , new_upper_limit ) }
generate adjuste min and max limits based on the datatype.
generate adjuste min and max limits based on the datatype .
typeinfo
&TypeInfo
old_lower_limit
f64
old_upper_limit
f64