mirror of https://github.com/CGAL/cgal
Use Fraction_traits::Compose more in Sqrt_extension.
This commit is contained in:
parent
abab39c204
commit
8f44c0ca26
|
|
@ -195,9 +195,10 @@ public:
|
||||||
> >::type* = 0 )
|
> >::type* = 0 )
|
||||||
{
|
{
|
||||||
typename Fraction_traits<NT>::Compose compose_nt;
|
typename Fraction_traits<NT>::Compose compose_nt;
|
||||||
|
typename Fraction_traits<ROOT>::Compose compose_root;
|
||||||
if ( a != 0 ) {
|
if ( a != 0 ) {
|
||||||
a0_ = compose_nt(-b,2*a);
|
a0_ = compose_nt(-b,2*a);
|
||||||
root_ = CGAL_NTS square(a0_) - ROOT(c,a);
|
root_ = CGAL_NTS square(a0_) - compose_root(c,a);
|
||||||
if(CGAL_NTS is_zero(root_)) {
|
if(CGAL_NTS is_zero(root_)) {
|
||||||
is_extended_ = false;
|
is_extended_ = false;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -127,8 +127,8 @@ CGAL::Sqrt_extension<double,double,Tag1,Tag2> create_root_helper(RT a, RT b,CGAL
|
||||||
template < class T, class RT,class Tag1, class Tag2 >
|
template < class T, class RT,class Tag1, class Tag2 >
|
||||||
CGAL::Sqrt_extension<T,T,Tag1,Tag2> create_root_helper(RT a, RT b, CGAL::Sqrt_extension<T,T,Tag1,Tag2> *)
|
CGAL::Sqrt_extension<T,T,Tag1,Tag2> create_root_helper(RT a, RT b, CGAL::Sqrt_extension<T,T,Tag1,Tag2> *)
|
||||||
{
|
{
|
||||||
T t(a,b);
|
typename CGAL::Fraction_traits<T>::Compose comp;
|
||||||
return CGAL::Sqrt_extension<T,T,Tag1,Tag2>( t );
|
return CGAL::Sqrt_extension<T,T,Tag1,Tag2>( comp(a, b) );
|
||||||
}
|
}
|
||||||
|
|
||||||
template < class Root, class RT >
|
template < class Root, class RT >
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue