pythagoras.f

## Class Points

• ```public class Points
extends Object```
Point-related utility methods.
• ### Field Summary

Fields
Modifier and Type Field and Description
`static IPoint` `ZERO`
The point at the origin.
• ### Constructor Summary

Constructors
Constructor and Description
`Points()`
• ### Method Summary

All Methods
Modifier and Type Method and Description
`static float` ```distance(float x1, float y1, float x2, float y2)```
Returns the Euclidean distance between the specified two points.
`static float` ```distanceSq(float x1, float y1, float x2, float y2)```
Returns the squared Euclidean distance between the specified two points.
`static boolean` ```epsilonEquals(IPoint p1, IPoint p2)```
Returns true if the supplied points' x and y components are equal to one another within `MathUtil.EPSILON`.
`static boolean` ```epsilonEquals(IPoint p1, IPoint p2, float epsilon)```
Returns true if the supplied points' x and y components are equal to one another within `epsilon`.
`static Point` ```inverseTransform(float x, float y, float sx, float sy, float rotation, float tx, float ty, Point result)```
Inverse transforms a point as specified, storing the result in the point provided.
`static String` ```pointToString(float x, float y)```
Returns a string describing the supplied point, of the form `+x+y`, `+x-y`, `-x-y`, etc.
`static Point` ```transform(float x, float y, float sx, float sy, float sina, float cosa, float tx, float ty, Point result)```
Transforms a point as specified, storing the result in the point provided.
`static Point` ```transform(float x, float y, float sx, float sy, float rotation, float tx, float ty, Point result)```
Transforms a point as specified, storing the result in the point provided.
• ### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`
• ### Field Detail

• #### ZERO

`public static final IPoint ZERO`
The point at the origin.
• ### Constructor Detail

• #### Points

`public Points()`
• ### Method Detail

• #### distanceSq

```public static float distanceSq(float x1,
float y1,
float x2,
float y2)```
Returns the squared Euclidean distance between the specified two points.
• #### distance

```public static float distance(float x1,
float y1,
float x2,
float y2)```
Returns the Euclidean distance between the specified two points.
• #### epsilonEquals

```public static boolean epsilonEquals(IPoint p1,
IPoint p2)```
Returns true if the supplied points' x and y components are equal to one another within `MathUtil.EPSILON`.
• #### epsilonEquals

```public static boolean epsilonEquals(IPoint p1,
IPoint p2,
float epsilon)```
Returns true if the supplied points' x and y components are equal to one another within `epsilon`.
• #### transform

```public static Point transform(float x,
float y,
float sx,
float sy,
float rotation,
float tx,
float ty,
Point result)```
Transforms a point as specified, storing the result in the point provided.
Returns:
a reference to the result point, for chaining.
• #### transform

```public static Point transform(float x,
float y,
float sx,
float sy,
float sina,
float cosa,
float tx,
float ty,
Point result)```
Transforms a point as specified, storing the result in the point provided.
Returns:
a reference to the result point, for chaining.
• #### inverseTransform

```public static Point inverseTransform(float x,
float y,
float sx,
float sy,
float rotation,
float tx,
float ty,
Point result)```
Inverse transforms a point as specified, storing the result in the point provided.
Returns:
a reference to the result point, for chaining.
• #### pointToString

```public static String pointToString(float x,
float y)```
Returns a string describing the supplied point, of the form `+x+y`, `+x-y`, `-x-y`, etc.