fn integrate_basis(bias: f64, s: f64) -> f64 {
    if bias <= 1.0 {
        let iy0 = 4.0 * s.powi(3) - 3.0 * s.powi(4);
        let iy1 = s.powi(2);
        iy0 + bias * (iy1 - iy0)
    } else if bias < 1.0002 {
        // This is a more numerically robust approximation to the
        // exact analytical formula in the next clause.
        let b = (bias - 1.0) * (4.0 / 3.0);
        (1.0 - b) * s.powi(2) + b * s.powi(3)
    } else {
        let a = (bias - 1.0).min(MAX_A);
        let norm = 1.0 / (1.0 - a) + (1.0 - a).ln() - 1.0;
        (1.0 / (1.0 - a * s) + (1.0 - a * s).ln() - 1.0) / norm
    }
}
/// Compute integral of basis function.
///
/// The integral of the basis function can be represented as a reasonably
/// simple closed-form analytic formula.
///
/// Note: this is normalized so that f(1) - f(0) = 1.
///
/// This is oriented for the rightmost control point.
Compute integral of basis function.
The integral of the basis function can be represented as a reasonably
simple closed-form analytic formula.

this is normalized so that f(1) - f(0) = 1.

This is oriented for the rightmost control point.
Compute integral of basis function . The integral of the basis function can be represented as a reasonably simple closed - form analytic formula . this is normalized so that f ( 1 ) - f ( 0 ) = 1 . This is oriented for the rightmost control point .
fn integrate_basis(bias: f64, s: f64) -> f64 {
    if bias <= 1.0 {
        let iy0 = 4.0 * s.powi(3) - 3.0 * s.powi(4);
        let iy1 = s.powi(2);
        iy0 + bias * (iy1 - iy0)
    } else if bias < 1.0002 {
        // This is a more numerically robust approximation to the
        // exact analytical formula in the next clause.
        let b = (bias - 1.0) * (4.0 / 3.0);
        (1.0 - b) * s.powi(2) + b * s.powi(3)
    } else {
        let a = (bias - 1.0).min(MAX_A);
        let norm = 1.0 / (1.0 - a) + (1.0 - a).ln() - 1.0;
        (1.0 / (1.0 - a * s) + (1.0 - a * s).ln() - 1.0) / norm
    }
}
fn integrate_basis ( bias : f64 , s : f64 ) -> f64 { if bias <= 1.0 { let iy0 = 4.0 * s . powi ( 3 ) - 3.0 * s . powi ( 4 ) ; let iy1 = s . powi ( 2 ) ; iy0 + bias * ( iy1 - iy0 ) } else if bias < 1.0002 { // This is a more numerically robust approximation to the // exact analytical formula in the next clause. let b = ( bias - 1.0 ) * ( 4.0 / 3.0 ) ; ( 1.0 - b ) * s . powi ( 2 ) + b * s . powi ( 3 ) } else { let a = ( bias - 1.0 ) . min ( MAX_A ) ; let norm = 1.0 / ( 1.0 - a ) + ( 1.0 - a ) . ln ( ) - 1.0 ; ( 1.0 / ( 1.0 - a * s ) + ( 1.0 - a * s ) . ln ( ) - 1.0 ) / norm } }
Compute integral of basis function.
Compute integral of basis function .
bias
f64
s
f64
bias
f64
s
f64