Methods Summary |
---|
public int | describeContents()Parcelable interface methods
return 0;
|
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 boolean | equals(java.lang.Object o)
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
PointF pointF = (PointF) o;
if (Float.compare(pointF.x, x) != 0) return false;
if (Float.compare(pointF.y, y) != 0) return false;
return true;
|
public int | hashCode()
int result = (x != +0.0f ? Float.floatToIntBits(x) : 0);
result = 31 * result + (y != +0.0f ? Float.floatToIntBits(y) : 0);
return result;
|
public final float | length()Return the euclidian distance from (0,0) to the point
return length(x, 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 void | negate()
x = -x;
y = -y;
|
public final void | offset(float dx, float dy)
x += dx;
y += dy;
|
public void | readFromParcel(android.os.Parcel in)Set the point's coordinates from the data stored in the specified
parcel. To write a point to a parcel, call writeToParcel().
x = in.readFloat();
y = in.readFloat();
|
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;
|
public java.lang.String | toString()
return "PointF(" + x + ", " + y + ")";
|
public void | writeToParcel(android.os.Parcel out, int flags)Write this point to the specified parcel. To restore a point from
a parcel, use readFromParcel()
out.writeFloat(x);
out.writeFloat(y);
|