CGAL::Rational_traits<NT>

Definition

The class Rational_traits<NT> can be used to determine the type of the numerator and denominator of a rational number type as Quotient, Gmpq, mpq_class or leda_rational.

#include <CGAL/Rational_traits.h>

Types

Rational_traits<NT>::RT
the type of the numerator and denominator.

Operations

RT t.numerator ( NT r) returns the numerator of r.

RT t.denominator ( NT r) returns the denominator of r.

NT t.make_rational ( RT n, RT d) constructs a rational number.

NT t.make_rational ( NT n, NT d) constructs a rational number.