pub(crate) fn params_for_v(v: Vec2) -> (f64, f64) {
        let th = v.atan2();
        // This formula ensures that bezier parameters approximating
        // a circular arc map to a bias of 1.0.
        let a = v.hypot() * 1.5 * (th.cos() + 1.0);
        let bias = if a < 1.0 {
            2.0 - a * a
        } else {
            1.0 + 2.0 * (0.5 * (1.0 - a)).tanh()
        };
        (th, bias)
    }
/// Determine params for a control arm.
///
/// Return values are theta and bias.
Determine params for a control arm.
Return values are theta and bias.
Determine params for a control arm . Return values are theta and bias .
pub(crate) fn params_for_v(v: Vec2) -> (f64, f64) {
        let th = v.atan2();
        // This formula ensures that bezier parameters approximating
        // a circular arc map to a bias of 1.0.
        let a = v.hypot() * 1.5 * (th.cos() + 1.0);
        let bias = if a < 1.0 {
            2.0 - a * a
        } else {
            1.0 + 2.0 * (0.5 * (1.0 - a)).tanh()
        };
        (th, bias)
    }
pub ( crate ) fn params_for_v ( v : Vec2 ) -> ( f64 , f64 ) { let th = v . atan2 ( ) ; // This formula ensures that bezier parameters approximating // a circular arc map to a bias of 1.0. let a = v . hypot ( ) * 1.5 * ( th . cos ( ) + 1.0 ) ; let bias = if a < 1.0 { 2.0 - a * a } else { 1.0 + 2.0 * ( 0.5 * ( 1.0 - a ) ) . tanh ( ) } ; ( th , bias ) }
Determine params for a control arm.
Determine params for a control arm .
v
Vec2
v
Vec2