net.java.html.leaflet

## Class Point

• ```public final class Point
extends Object```
Represents a point with x and y coordinates in pixels.
• ### Constructor Summary

Constructors
Constructor and Description
```Point(double x, double y)```
Creates a Point object with the given x and y coordinates.
```Point(double x, double y, boolean round)```
Creates a Point object with the given x and y coordinates.
• ### Method Summary

All Methods
Modifier and Type Method and Description
`Point` `add(Point other)`
Returns the result of addition of the current and the given points.
`Point` `clone()`
Returns a copy of the current point.
`boolean` `contains(Point other)`
Returns `true` if the both coordinates of the given point are less than the corresponding current point coordinates (in absolute values).
`double` `distanceTo(Point other)`
Returns the distance between the current and the given points.
`Point` `divideBy(double number)`
Returns the result of division of the current point by the given number.
`Point` ```divideBy(double number, boolean round)```
Returns the result of division of the current point by the given number.
`boolean` `equals(Object other)`
Returns `true` if the given point has the same coordinates.
`Point` `floor()`
Returns a copy of the current point with floored coordinates (rounded down).
`double` `getX()`
Gets the x coordinate.
`double` `getY()`
Gets the y coordinate.
`Point` `multiplyBy(double number)`
Returns the result of multiplication of the current point by the given number.
`Point` `round()`
Returns a copy of the current point with rounded coordinates.
`void` `setX(double x)`
Sets the x coordinate.
`void` `setY(double y)`
Sets the y coordinate
`Point` `subtract(Point other)`
Returns the result of subtraction of the given point from the current.
`String` `toString()`
Returns a string representation of the point for debugging purposes.
• ### Methods inherited from class java.lang.Object

`finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`
• ### Constructor Detail

• #### Point

```public Point(double x,
double y)```
Creates a Point object with the given x and y coordinates.
Parameters:
`x` - The x coordinate.
`y` - The y coordinate.
• #### Point

```public Point(double x,
double y,
boolean round)```
Creates a Point object with the given x and y coordinates.
Parameters:
`x` - The x coordinate.
`y` - The y coordinate.
`round` - Rounds the x and y value if `true`.
• ### Method Detail

• #### getX

`public double getX()`
Gets the x coordinate.
Returns:
Returns the x coordinate.
• #### setX

`public void setX(double x)`
Sets the x coordinate.
Parameters:
`x` - The x coordinate.
• #### getY

`public double getY()`
Gets the y coordinate.
Returns:
Returns the y coordinate.
• #### setY

`public void setY(double y)`
Sets the y coordinate
Parameters:
`y` - The y coordinate.

`public Point add(Point other)`
Returns the result of addition of the current and the given points.
Parameters:
`other` - The given point.
Returns:
Returns the result of addition of the current and the given points.
• #### subtract

`public Point subtract(Point other)`
Returns the result of subtraction of the given point from the current.
Parameters:
`other` - The given point.
Returns:
Returns the result of subtraction of the given point from the current.
• #### multiplyBy

`public Point multiplyBy(double number)`
Returns the result of multiplication of the current point by the given number.
Parameters:
`number` - The given number.
Returns:
Returns the result of multiplication of the current point by the given number.
• #### divideBy

`public Point divideBy(double number)`
Returns the result of division of the current point by the given number.
Parameters:
`number` - The given number.
Returns:
Returns the result of division of the current point by the given number.
• #### divideBy

```public Point divideBy(double number,
boolean round)```
Returns the result of division of the current point by the given number.
Parameters:
`number` - The given number.
`round` - Rounds the result if true.
Returns:
Returns the result of division of the current point by the given number.
• #### distanceTo

`public double distanceTo(Point other)`
Returns the distance between the current and the given points.
Parameters:
`other` - The given point.
Returns:
Returns the distance between the current and the given points.
• #### clone

`public Point clone()`
Returns a copy of the current point.
Overrides:
`clone` in class `Object`
Returns:
Returns a copy of the current point.
• #### round

`public Point round()`
Returns a copy of the current point with rounded coordinates.
Returns:
Returns a copy of the current point with rounded coordinates.
• #### floor

`public Point floor()`
Returns a copy of the current point with floored coordinates (rounded down).
Returns:
Returns a copy of the current point with floored coordinates (rounded down).
• #### equals

`public boolean equals(Object other)`
Returns `true` if the given point has the same coordinates.
Overrides:
`equals` in class `Object`
Parameters:
`other` - The other point.
Returns:
Returns `true` if the given point has the same coordinates.
• #### contains

`public boolean contains(Point other)`
Returns `true` if the both coordinates of the given point are less than the corresponding current point coordinates (in absolute values).
Parameters:
`other` - The other point.
Returns:
Returns `true` if the both coordinates of the given point are less than the corresponding current point coordinates (in absolute values).
• #### toString

`public String toString()`
Returns a string representation of the point for debugging purposes.
Overrides:
`toString` in class `Object`
Returns:
Returns a string representation of the point for debugging purposes.