fn ppp(
        point1: &Point<I>,
        point2: &Point<I>,
        point3: &Point<I>,
        circle: &VC::CircleEventType,
        recompute_c_x: bool,
        recompute_c_y: bool,
        recompute_lower_x: bool,
    ) {
        let xi_to_xf = TC2::<I, F>::xi_to_xf;
        let i_to_xi = TC1::<I>::i_to_xi;

        let dif_x = [
            i_to_xi(point1.x) - i_to_xi(point2.x),
            i_to_xi(point2.x) - i_to_xi(point3.x),
            i_to_xi(point1.x) - i_to_xi(point3.x),
        ];

        let dif_y = [
            i_to_xi(point1.y) - i_to_xi(point2.y),
            i_to_xi(point2.y) - i_to_xi(point3.y),
            i_to_xi(point1.y) - i_to_xi(point3.y),
        ];

        let sum_x = [
            i_to_xi(point1.x) + i_to_xi(point2.x),
            i_to_xi(point2.x) + i_to_xi(point3.x),
        ];
        let sum_y = [
            i_to_xi(point1.y) + i_to_xi(point2.y),
            i_to_xi(point2.y) + i_to_xi(point3.y),
        ];

        let inv_denom = {
            let tmp = &dif_x[0] * &dif_y[1] - &dif_x[1] * &dif_y[0];
            EX::ExtendedExponentFpt::<f64>::from(0.5) / xi_to_xf(&tmp)
        };
        let numer1: EI::ExtendedInt = &dif_x[0] * &sum_x[0] + &dif_y[0] * &sum_y[0];
        let numer2: EI::ExtendedInt = &dif_x[1] * &sum_x[1] + &dif_y[1] * &sum_y[1];

        if recompute_c_x || recompute_lower_x {
            let c_x: EI::ExtendedInt = &numer1 * &dif_y[1] - &numer2 * &dif_y[0];
            circle.set_x_xf(xi_to_xf(&c_x) * inv_denom);

            if recompute_lower_x {
                // Evaluate radius of the circle.
                let sqr_r: EI::ExtendedInt = (&dif_x[0] * &dif_x[0] + &dif_y[0] * &dif_y[0])
                    * (&dif_x[1] * &dif_x[1] + &dif_y[1] * &dif_y[1])
                    * (&dif_x[2] * &dif_x[2] + &dif_y[2] * &dif_y[2]);
                let r = xi_to_xf(&sqr_r).sqrt();

                // If c_x >= 0 then lower_x = c_x + r,
                // else lower_x = (c_x * c_x - r * r) / (c_x - r).
                // To guarantee epsilon relative error.

                // this value will be invalid after call to set_lower_x()
                let tmp_circle_x = circle.0.get().x_as_xf();

                if !tmp_circle_x.is_neg() {
                    if !inv_denom.is_neg() {
                        circle.set_lower_x_xf(tmp_circle_x + r * inv_denom);
                    } else {
                        circle.set_lower_x_xf(tmp_circle_x - r * inv_denom);
                    }
                } else {
                    let numer: EI::ExtendedInt = &c_x * &c_x - &sqr_r;
                    let lower_x = xi_to_xf(&numer) * inv_denom / (xi_to_xf(&c_x) + r);
                    circle.set_lower_x_xf(lower_x);
                }
            }
        }

        if recompute_c_y {
            let c_y: EI::ExtendedInt = &numer2 * &dif_x[0] - &numer1 * &dif_x[1];
            circle.set_y_xf(xi_to_xf(&c_y) * inv_denom);
        }
        #[cfg(feature = "console_debug")]
        {
            let c = circle.0.get();
            tln!(
                "ppp(x:{:.12}, y:{:.12}, lx:{:.12})",
                c.x(),
                c.y(),
                c.lower_x()
            );
        }
    }
/// Recompute parameters of the point, point, point circle event using high-precision library.
Recompute parameters of the point, point, point circle event using high-precision library.
Recompute parameters of the point point point circle event using high - precision library .
fn ppp(
        point1: &Point<I>,
        point2: &Point<I>,
        point3: &Point<I>,
        circle: &VC::CircleEventType,
        recompute_c_x: bool,
        recompute_c_y: bool,
        recompute_lower_x: bool,
    ) {
        let xi_to_xf = TC2::<I, F>::xi_to_xf;
        let i_to_xi = TC1::<I>::i_to_xi;
        let dif_x = [
            i_to_xi(point1.x) - i_to_xi(point2.x),
            i_to_xi(point2.x) - i_to_xi(point3.x),
            i_to_xi(point1.x) - i_to_xi(point3.x),
        ];
        let dif_y = [
            i_to_xi(point1.y) - i_to_xi(point2.y),
            i_to_xi(point2.y) - i_to_xi(point3.y),
            i_to_xi(point1.y) - i_to_xi(point3.y),
        ];
        let sum_x = [
            i_to_xi(point1.x) + i_to_xi(point2.x),
            i_to_xi(point2.x) + i_to_xi(point3.x),
        ];
        let sum_y = [
            i_to_xi(point1.y) + i_to_xi(point2.y),
            i_to_xi(point2.y) + i_to_xi(point3.y),
        ];
        let inv_denom = {
            let tmp = &dif_x[0] * &dif_y[1] - &dif_x[1] * &dif_y[0];
            EX::ExtendedExponentFpt::<f64>::from(0.5) / xi_to_xf(&tmp)
        };
        let numer1: EI::ExtendedInt = &dif_x[0] * &sum_x[0] + &dif_y[0] * &sum_y[0];
        let numer2: EI::ExtendedInt = &dif_x[1] * &sum_x[1] + &dif_y[1] * &sum_y[1];
        if recompute_c_x || recompute_lower_x {
            let c_x: EI::ExtendedInt = &numer1 * &dif_y[1] - &numer2 * &dif_y[0];
            circle.set_x_xf(xi_to_xf(&c_x) * inv_denom);
            if recompute_lower_x {
                // Evaluate radius of the circle.
                let sqr_r: EI::ExtendedInt = (&dif_x[0] * &dif_x[0] + &dif_y[0] * &dif_y[0])
                    * (&dif_x[1] * &dif_x[1] + &dif_y[1] * &dif_y[1])
                    * (&dif_x[2] * &dif_x[2] + &dif_y[2] * &dif_y[2]);
                let r = xi_to_xf(&sqr_r).sqrt();
                // If c_x >= 0 then lower_x = c_x + r,
                // else lower_x = (c_x * c_x - r * r) / (c_x - r).
                // To guarantee epsilon relative error.
                // this value will be invalid after call to set_lower_x()
                let tmp_circle_x = circle.0.get().x_as_xf();
                if !tmp_circle_x.is_neg() {
                    if !inv_denom.is_neg() {
                        circle.set_lower_x_xf(tmp_circle_x + r * inv_denom);
                    } else {
                        circle.set_lower_x_xf(tmp_circle_x - r * inv_denom);
                    }
                } else {
                    let numer: EI::ExtendedInt = &c_x * &c_x - &sqr_r;
                    let lower_x = xi_to_xf(&numer) * inv_denom / (xi_to_xf(&c_x) + r);
                    circle.set_lower_x_xf(lower_x);
                }
            }
        }
        if recompute_c_y {
            let c_y: EI::ExtendedInt = &numer2 * &dif_x[0] - &numer1 * &dif_x[1];
            circle.set_y_xf(xi_to_xf(&c_y) * inv_denom);
        }
        #[cfg(feature = "console_debug")]
        {
            let c = circle.0.get();
            tln!(
                "ppp(x:{:.12}, y:{:.12}, lx:{:.12})",
                c.x(),
                c.y(),
                c.lower_x()
            );
        }
    }
fn ppp ( point1 : & Point < I > , point2 : & Point < I > , point3 : & Point < I > , circle : & VC :: CircleEventType , recompute_c_x : bool , recompute_c_y : bool , recompute_lower_x : bool , ) { let xi_to_xf = TC2 :: < I , F > :: xi_to_xf ; let i_to_xi = TC1 :: < I > :: i_to_xi ; let dif_x = [ i_to_xi ( point1 . x ) - i_to_xi ( point2 . x ) , i_to_xi ( point2 . x ) - i_to_xi ( point3 . x ) , i_to_xi ( point1 . x ) - i_to_xi ( point3 . x ) , ] ; let dif_y = [ i_to_xi ( point1 . y ) - i_to_xi ( point2 . y ) , i_to_xi ( point2 . y ) - i_to_xi ( point3 . y ) , i_to_xi ( point1 . y ) - i_to_xi ( point3 . y ) , ] ; let sum_x = [ i_to_xi ( point1 . x ) + i_to_xi ( point2 . x ) , i_to_xi ( point2 . x ) + i_to_xi ( point3 . x ) , ] ; let sum_y = [ i_to_xi ( point1 . y ) + i_to_xi ( point2 . y ) , i_to_xi ( point2 . y ) + i_to_xi ( point3 . y ) , ] ; let inv_denom = { let tmp = & dif_x [ 0 ] * & dif_y [ 1 ] - & dif_x [ 1 ] * & dif_y [ 0 ] ; EX :: ExtendedExponentFpt :: < f64 > :: from ( 0.5 ) / xi_to_xf ( & tmp ) } ; let numer1 : EI :: ExtendedInt = & dif_x [ 0 ] * & sum_x [ 0 ] + & dif_y [ 0 ] * & sum_y [ 0 ] ; let numer2 : EI :: ExtendedInt = & dif_x [ 1 ] * & sum_x [ 1 ] + & dif_y [ 1 ] * & sum_y [ 1 ] ; if recompute_c_x || recompute_lower_x { let c_x : EI :: ExtendedInt = & numer1 * & dif_y [ 1 ] - & numer2 * & dif_y [ 0 ] ; circle . set_x_xf ( xi_to_xf ( & c_x ) * inv_denom ) ; if recompute_lower_x { // Evaluate radius of the circle. let sqr_r : EI :: ExtendedInt = ( & dif_x [ 0 ] * & dif_x [ 0 ] + & dif_y [ 0 ] * & dif_y [ 0 ] ) * ( & dif_x [ 1 ] * & dif_x [ 1 ] + & dif_y [ 1 ] * & dif_y [ 1 ] ) * ( & dif_x [ 2 ] * & dif_x [ 2 ] + & dif_y [ 2 ] * & dif_y [ 2 ] ) ; let r = xi_to_xf ( & sqr_r ) . sqrt ( ) ; // If c_x >= 0 then lower_x = c_x + r, // else lower_x = (c_x * c_x - r * r) / (c_x - r). // To guarantee epsilon relative error. // this value will be invalid after call to set_lower_x() let tmp_circle_x = circle . 0 . get ( ) . x_as_xf ( ) ; if ! tmp_circle_x . is_neg ( ) { if ! inv_denom . is_neg ( ) { circle . set_lower_x_xf ( tmp_circle_x + r * inv_denom ) ; } else { circle . set_lower_x_xf ( tmp_circle_x - r * inv_denom ) ; } } else { let numer : EI :: ExtendedInt = & c_x * & c_x - & sqr_r ; let lower_x = xi_to_xf ( & numer ) * inv_denom / ( xi_to_xf ( & c_x ) + r ) ; circle . set_lower_x_xf ( lower_x ) ; } } } if recompute_c_y { let c_y : EI :: ExtendedInt = & numer2 * & dif_x [ 0 ] - & numer1 * & dif_x [ 1 ] ; circle . set_y_xf ( xi_to_xf ( & c_y ) * inv_denom ) ; } # [ cfg ( feature " " ) ] { let c = circle . 0 . get ( ) ; tln ! ( " " c x ( ) c y ( ) c lower_x ( ) ) ; } }
Recompute parameters of the point, point, point circle event using high-precision library.
Recompute parameters of the point point point circle event using high - precision library .
point1
&Point<I>
point2
&Point<I>
point3
&Point<I>
circle
&VC::CircleEventType
recompute_c_x
bool
recompute_c_y
bool
recompute_lower_x
bool