pythagoras.f

## Interface ILine

• ### Method Summary

All Methods
Modifier and Type Method and Description
`Line` `clone()`
Returns a mutable copy of this line.
`Point` `p1()`
Returns a copy of the starting point of this line.
`Point` `p1(Point target)`
Initializes the supplied point with this line's starting point.
`Point` `p2()`
Returns a copy of the ending point of this line.
`Point` `p2(Point target)`
Initializes the supplied point with this line's ending point.
`float` ```pointLineDist(float px, float py)```
Returns the distance from the specified point to the line defined by this line segment.
`float` `pointLineDist(XY p)`
Returns the distance from the supplied point to the line defined by this line segment.
`float` ```pointLineDistSq(float px, float py)```
Returns the square of the distance from the specified point to the line defined by this line segment.
`float` `pointLineDistSq(XY p)`
Returns the square of the distance from the supplied point to the line defined by this line segment.
`float` ```pointSegDist(float px, float py)```
Returns the distance from the specified point this line segment.
`float` `pointSegDist(XY p)`
Returns the distance from the supplied point this line segment.
`float` ```pointSegDistSq(float px, float py)```
Returns the square of the distance from the specified point this line segment.
`float` `pointSegDistSq(XY p)`
Returns the square of the distance from the supplied point this line segment.
`int` ```relativeCCW(float px, float py)```
Returns an indicator of where the specified point (px,py) lies with respect to this line segment.
`int` `relativeCCW(XY p)`
Returns an indicator of where the specified point lies with respect to this line segment.
`float` `x1()`
Returns the x-coordinate of the start of this line.
`float` `x2()`
Returns the x-coordinate of the end of this line.
`float` `y1()`
Returns the y-coordinate of the start of this line.
`float` `y2()`
Returns the y-coordinate of the end of this line.
• ### Methods inherited from interface pythagoras.f.IShape

`bounds, bounds, contains, contains, contains, contains, intersects, intersects, isEmpty, pathIterator, pathIterator`
• ### Method Detail

• #### x1

`float x1()`
Returns the x-coordinate of the start of this line.
• #### y1

`float y1()`
Returns the y-coordinate of the start of this line.
• #### x2

`float x2()`
Returns the x-coordinate of the end of this line.
• #### y2

`float y2()`
Returns the y-coordinate of the end of this line.
• #### p1

`Point p1()`
Returns a copy of the starting point of this line.
• #### p1

`Point p1(Point target)`
Initializes the supplied point with this line's starting point.
Returns:
the supplied point.
• #### p2

`Point p2()`
Returns a copy of the ending point of this line.
• #### p2

`Point p2(Point target)`
Initializes the supplied point with this line's ending point.
Returns:
the supplied point.
• #### pointLineDistSq

```float pointLineDistSq(float px,
float py)```
Returns the square of the distance from the specified point to the line defined by this line segment.
• #### pointLineDistSq

`float pointLineDistSq(XY p)`
Returns the square of the distance from the supplied point to the line defined by this line segment.
• #### pointLineDist

```float pointLineDist(float px,
float py)```
Returns the distance from the specified point to the line defined by this line segment.
• #### pointLineDist

`float pointLineDist(XY p)`
Returns the distance from the supplied point to the line defined by this line segment.
• #### pointSegDistSq

```float pointSegDistSq(float px,
float py)```
Returns the square of the distance from the specified point this line segment.
• #### pointSegDistSq

`float pointSegDistSq(XY p)`
Returns the square of the distance from the supplied point this line segment.
• #### pointSegDist

```float pointSegDist(float px,
float py)```
Returns the distance from the specified point this line segment.
• #### pointSegDist

`float pointSegDist(XY p)`
Returns the distance from the supplied point this line segment.
• #### relativeCCW

```int relativeCCW(float px,
float py)```
Returns an indicator of where the specified point (px,py) lies with respect to this line segment.
• #### relativeCCW

`int relativeCCW(XY p)`
Returns an indicator of where the specified point lies with respect to this line segment.
• #### clone

`Line clone()`
Returns a mutable copy of this line.