pythagoras.f

## Class Point

• ### Field Summary

Fields
Modifier and Type Field and Description
`float` `x`
The x-coordinate of the point.
`float` `y`
The y-coordinate of the point.
• ### Constructor Summary

Constructors
Constructor and Description
`Point()`
Constructs a point at (0, 0).
```Point(float x, float y)```
Constructs a point at the specified coordinates.
`Point(XY p)`
Constructs a point with coordinates equal to the supplied point.
• ### Method Summary

All Methods
Modifier and Type Method and Description
`Point` ```addLocal(float dx, float dy)```
Translates this point by the specified offset.
`Point` `multLocal(float s)`
Multiplies this point by a scale factor.
`Point` `rotateLocal(float angle)`
Rotates this point in-place by the specified angle.
`Point` ```set(float x, float y)```
Sets the coordinates of this point to the supplied values.
`Point` `set(XY p)`
Sets the coordinates of this point to be equal to those of the supplied point.
`Point` ```subtractLocal(float x, float y)```
Subtracts the supplied x/y from this point.
`float` `x()`
The x coordinate.
`float` `y()`
The y coordinate.
• ### Methods inherited from class pythagoras.f.AbstractPoint

`add, add, add, clone, direction, distance, distance, distanceSq, distanceSq, equals, hashCode, mult, mult, rotate, rotate, subtract, subtract, subtract, toString`
• ### Methods inherited from class java.lang.Object

`getClass, notify, notifyAll, wait, wait, wait`
• ### Field Detail

• #### x

`public float x`
The x-coordinate of the point.
• #### y

`public float y`
The y-coordinate of the point.
• ### Constructor Detail

• #### Point

`public Point()`
Constructs a point at (0, 0).
• #### Point

```public Point(float x,
float y)```
Constructs a point at the specified coordinates.
• #### Point

`public Point(XY p)`
Constructs a point with coordinates equal to the supplied point.
• ### Method Detail

• #### set

`public Point set(XY p)`
Sets the coordinates of this point to be equal to those of the supplied point.
Returns:
a reference to this this, for chaining.
• #### set

```public Point set(float x,
float y)```
Sets the coordinates of this point to the supplied values.
Returns:
a reference to this this, for chaining.
• #### multLocal

`public Point multLocal(float s)`
Multiplies this point by a scale factor.
Returns:
a a reference to this point, for chaining.

```public Point addLocal(float dx,
float dy)```
Translates this point by the specified offset.
Returns:
a reference to this point, for chaining.
• #### rotateLocal

`public Point rotateLocal(float angle)`
Rotates this point in-place by the specified angle.
Returns:
a reference to this point, for chaining.
• #### subtractLocal

```public Point subtractLocal(float x,
float y)```
Subtracts the supplied x/y from this point.
Returns:
a reference to this point, for chaining.
• #### x

`public float x()`
Description copied from interface: `XY`
The x coordinate.
Specified by:
`x` in interface `XY`
• #### y

`public float y()`
Description copied from interface: `XY`
The y coordinate.
Specified by:
`y` in interface `XY`