public class Point extends AbstractPoint implements Serializable
Modifier and Type | Field and Description |
---|---|
double |
x
The x-coordinate of the point.
|
double |
y
The y-coordinate of the point.
|
Constructor and Description |
---|
Point()
Constructs a point at (0, 0).
|
Point(double x,
double y)
Constructs a point at the specified coordinates.
|
Point(XY p)
Constructs a point with coordinates equal to the supplied point.
|
Modifier and Type | Method and Description |
---|---|
Point |
addLocal(double dx,
double dy)
Translates this point by the specified offset.
|
Point |
multLocal(double s)
Multiplies this point by a scale factor.
|
Point |
rotateLocal(double angle)
Rotates this point in-place by the specified angle.
|
Point |
set(double x,
double 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(double x,
double y)
Subtracts the supplied x/y from this point.
|
double |
x()
The x coordinate.
|
double |
y()
The y coordinate.
|
public double x
public double y
public Point()
public Point(double x, double y)
public Point(XY p)
public Point set(XY p)
public Point set(double x, double y)
public Point multLocal(double s)
public Point addLocal(double dx, double dy)
public Point rotateLocal(double angle)
public Point subtractLocal(double x, double y)
public double x()
XY
Copyright © 2017. All rights reserved.