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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

ool s.contains(const point& p)<br />

bool s.intersection(const segment& t)<br />

decides whether s contains p.<br />

bool s.intersection(const segment& t, point& p)<br />

decides whether s and t intersect in one point.<br />

if s and t intersect in a single point this point is assigned<br />

to p and the result is true, otherwise the result is false.<br />

bool s.intersection of lines(const segment& t, point& p)<br />

segment s.translate by angle(double alpha, double d)<br />

if line(s) and line(t) intersect in a single point this point<br />

is assigned to p and the result is true, otherwise the result<br />

is false.<br />

returns s translated in direction alpha by distance d.<br />

segment<br />

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

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

segment s.translate(const vector& v)<br />

returns s + v, i.e., s translated by vector v.<br />

Precondition: v.dim() = 2.<br />

segment<br />

segment<br />

s + const vector& v<br />

returns s translated by vector v.<br />

s − const vector& v<br />

returns s translated by vector −v.<br />

segment s.perpendicular(const point& p)<br />

double s.distance(const point& p)<br />

double s.sqr dist(const point& p)<br />

returns the segment perpendicular to s with source p and<br />

target on line(s).<br />

returns the Euclidean distance between p and s.<br />

returns the squared Euclidean distance between p and s.<br />

double s.distance( ) returns the Euclidean distance between (0, 0) and s.<br />

segment s.rotate(const point& q, double a)<br />

returns s rotated about point q by angle a.<br />

segment<br />

s.rotate(double alpha)<br />

returns s.rotate(s.source(), alpha).

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

Saved successfully!

Ooh no, something went wrong!