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.

circle C(const circle& c, int);<br />

4. Operations<br />

introduces a variable C of type circle. C is initialized to a<br />

copy of c. <strong>The</strong> second argument is for compatability with<br />

rat circle.<br />

point C.center( ) returns the center of C.<br />

Precondition: <strong>The</strong> orientation of C is not 0.<br />

double C.radius( ) returns the radius of C.<br />

Precondition: <strong>The</strong> orientation of C is not 0.<br />

double C.sqr radius( ) returns the squared radius of C.<br />

Precondition: <strong>The</strong> orientation of C is not 0.<br />

point C.point1( ) returns p 1 .<br />

point C.point2( ) returns p 2 .<br />

point C.point3( ) returns p 3 .<br />

point C.point on circle(double alpha, double = 0)<br />

returns a point p on C with angle of alpha.<br />

<strong>The</strong> second argument is for compatability with<br />

rat circle.<br />

bool C.is degenerate( ) returns true if the defining points are collinear.<br />

bool C.is trivial( ) returns true if C has radius zero.<br />

int C.orientation( ) returns the orientation of C.<br />

int C.side of(const point& p) returns −1, +1, or 0 if p lies right of, left of, or on<br />

C respectively.<br />

bool C.inside(const point& p) returns true iff p lies inside of C.<br />

bool C.outside(const point& p) returns true iff p lies outside of C.<br />

bool C.contains(const point& p)<br />

circle C.translate by angle(double a, double d)<br />

returns true iff p lies on C.<br />

returns C translated in direction a by distance d.<br />

circle<br />

C.translate(double dx, double dy)<br />

returns C translated by vector (dx, dy).<br />

circle C.translate(const vector& v)<br />

returns C translated by vector v.

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

Saved successfully!

Ooh no, something went wrong!