public class Px2d extends Object
int
coordinate vector.
Typical use case is to represent pixels in images.Modifier and Type | Field and Description |
---|---|
int |
x
X coordinate.
|
int |
y
Y coordinate.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isZero() |
static Px2d |
midpointOf(Px2d a,
Px2d b)
Middle point between two points.
|
Px2d |
minus(int x,
int y) |
Px2d |
minus(Px2d p) |
Px2d |
minusx(int x) |
Px2d |
minusy(int y) |
Px2d |
mul(int v)
Multiply coordinates.
|
Px2d |
mulx(int v) |
Px2d |
muly(int v) |
static Px2d |
of(int x,
int y)
A point.
|
Px2d |
plus(int x,
int y) |
Px2d |
plus(Px2d p) |
Px2d |
plusx(int x) |
Px2d |
plusy(int y) |
Px2d |
setx(int x) |
Px2d |
sety(int y) |
String |
toString() |
static Px2d |
zero()
Zero coordinate.
|
public Px2d mul(int v)
v
- Factorpublic Px2d mulx(int v)
public Px2d muly(int v)
public Px2d plus(int x, int y)
public Px2d minus(int x, int y)
public Px2d plusx(int x)
public Px2d minusx(int x)
public Px2d plusy(int y)
public Px2d minusy(int y)
public Px2d setx(int x)
public Px2d sety(int y)
public boolean isZero()
public static Px2d zero()
public static Px2d of(int x, int y)
x
- X coordinatey
- Y coordinate