CGAL::make_root_of_2

Definition

The function make_root_of_2 returns the root of a polynomial of degree 2 given its 3 coefficients and a boolean value selecting the smaller or larger root. The type of the arguments must be a model of the RingNumberType concept.

#include <CGAL/make_root_of_2.h>

template <typename RT>
Root_of_traits<RT>::RootOf_2
make_root_of_2 ( RT a, RT b, RT c, bool s)
Returns the root of the polynomial aX2+bX+c which is the smallest if s is true, or the largest if s is false. If RT supports a sqrt operation, then the usual formula is used. Otherwise the Root_of_2 class is used.
Precondition: a must be non-zero, and the polynomial must have a root.

See Also

RootOf_2
CGAL::Root_of_2<RT>