31.01.2014 Views

Version 5.0 The LEDA User Manual

Version 5.0 The LEDA User Manual

Version 5.0 The LEDA User Manual

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

14.13 Straight Rational Lines ( rat line )<br />

1. Definition<br />

An instance l of the data type rat line is a directed straight line in the two-dimensional<br />

plane.<br />

#include < <strong>LEDA</strong>/geo/rat line.h ><br />

2. Types<br />

rat line :: coord type<br />

rat line :: point type<br />

rat line :: float type<br />

the coordinate type (rational).<br />

the point type (rat point).<br />

the corresponding floatin-point type (line).<br />

3. Creation<br />

rat line l(const rat point& p, const rat point& q);<br />

rat line l(const rat segment& s);<br />

rat line l(const rat point& p, const rat vector& v);<br />

rat line l(const rat ray& r);<br />

introduces a variable l of type rat line. l is initialized to the<br />

line passing through points p and q directed form p to q.<br />

Precondition: p ≠ q.<br />

introduces a variable l of type rat line. l is initialized to the<br />

line supporting segment s.<br />

Precondition: s is nontrivial.<br />

introduces a variable l of type rat line. l is initialized to the<br />

line passing through points p and p + v.<br />

Precondition: v is a nonzero vector.<br />

introduces a variable l of type rat line. l is initialized to the<br />

line supporting ray r.<br />

rat line l;<br />

introduces a variable l of type rat line.<br />

rat line l(const line& l1 , int prec = rat point :: default precision);<br />

4. Operations<br />

introduces a variable l of type rat line. l is initialized to the<br />

line obtained by approximating the two defining points of l 1 .<br />

line l.to float( ) returns a floating point approximation of l.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!