Beispiel #1
0
complex operator/ (const complex& c1, const complex& c2)
{
        double abs2c2 = c2.abs2();
        double res_re = (c1.get_re()*c2.get_re() + c1.get_im()*c2.get_im())/abs2c2;
        double res_im = (c1.get_im()*c2.get_re() - c1.get_re()*c2.get_im())/abs2c2;
        complex res{res_re, res_im};

        return res;
}
Beispiel #2
0
//Construct the line with a given center
line::line(complex center){
    left = ideal(complex(1.0, sqrt(center.abs2() - 1.0)) / center.conj());
    right = ideal(complex(1.0, -sqrt(center.abs2() - 1.0)) / center.conj());
}