PointFpublic class PointF extends Object PointF holds two float coordinates |
Fields Summary |
---|
public float | x | public float | y |
Constructors Summary |
---|
public PointF()
| public PointF(float x, float y)
this.x = x;
this.y = y;
| public PointF(Point p)
this.x = p.x;
this.y = p.y;
|
Methods Summary |
---|
public final boolean | equals(float x, float y)Returns true if the point's coordinates equal (x,y)
return this.x == x && this.y == y;
| public static float | length(float x, float y)Returns the euclidian distance from (0,0) to (x,y)
return FloatMath.sqrt(x * x + y * y);
| public final float | length()Return the euclidian distance from (0,0) to the point
return length(x, y);
| public final void | negate()
x = -x;
y = -y;
| public final void | offset(float dx, float dy)
x += dx;
y += dy;
| public final void | set(float x, float y)Set the point's x and y coordinates
this.x = x;
this.y = y;
| public final void | set(android.graphics.PointF p)Set the point's x and y coordinates to the coordinates of p
this.x = p.x;
this.y = p.y;
|
|