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.

integer s.W2( ) returns the third homogeneous coordinate of the target<br />

point of s.<br />

double s.XD1( ) returns a floating point approximation of s.X1 ( ).<br />

double s.XD2( ) returns a floating point approximation of s.X2 ( ).<br />

double s.YD1( ) returns a floating point approximation of s.Y1 ( ).<br />

double s.YD2( ) returns a floating point approximation of s.Y2 ( ).<br />

double s.WD1( ) returns a floating point approximation of s.W1 ( ).<br />

double s.WD2( ) returns a floating point approximation of s.W2 ( ).<br />

integer s.dx( ) returns the normalized x-difference X2 · W 1 − X1 · W 2 of<br />

s.<br />

integer s.dy( ) returns the normalized y-difference Y 2 · W 1 − Y 1 · W 2 of<br />

s.<br />

double s.dxD( ) returns a floating point approximation of s.dx( ).<br />

double s.dyD( ) returns a floating point approximation of s.dy( ).<br />

bool s.is trivial( ) returns true if s is trivial.<br />

bool s.is vertical( ) returns true if s is vertical.<br />

Precondition: s is non-trivial.<br />

bool s.is horizontal( ) returns true if s is horizontal.<br />

Precondition: s is non-trivial.<br />

rational s.slope( ) returns the slope of s.<br />

Precondition: s is not vertical.<br />

int s.cmp slope(const rat segment& s1 )<br />

int s.orientation(const rat point& p)<br />

rational s.x proj(rational y)<br />

rational s.y proj(rational x)<br />

compares the slopes of s and s 1 .<br />

Precondition: s and s 1 are non-trivial.<br />

computes orientation(a, b, p) (see below), where a ≠ b and<br />

a and b appear in this order on segment s.<br />

returns p.xcoord(), where p ∈ line(s) with p.ycoord() = y.<br />

Precondition: s is not horizontal.<br />

returns p.ycoord(), where p ∈ line(s) with p.xcoord() = x.<br />

Precondition: s is not vertical.

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

Saved successfully!

Ooh no, something went wrong!