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.

segment s.rotate90(const point& q, int i = 1)<br />

segment s.rotate90(int i = 1)<br />

returns s rotated about q by an angle of i × 90 degrees.<br />

If i > 0 the rotation is counter-clockwise otherwise it is<br />

clockwise.<br />

returns s.rotate90(s.source(),i).<br />

segment s.reflect(const point& p, const point& q)<br />

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

returns s reflected across the straight line passing through<br />

p and q.<br />

returns s reflected across point p.<br />

segment s.reverse( ) returns s reversed.<br />

Non-Member Functions<br />

int orientation(const segment& s, const point& p)<br />

computes orientation(s.source(), s.target(), p).<br />

int cmp slopes(const segment& s1 , const segment& s2 )<br />

returns compare(slope(s 1 ), slope(s 2 )).<br />

int cmp segments at xcoord(const segment& s1 , const segment& s2 ,<br />

const point& p)<br />

compares points l 1 ∩ v and l 2 ∩ v where l i is the line underlying<br />

segment s i and v is the vertical straight line passing<br />

through point p.<br />

bool parallel(const segment& s1 , const segment& s2 )<br />

returns true if s 1 and s 2 are parallel and false otherwise.

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

Saved successfully!

Ooh no, something went wrong!