Fixed some stray doubles that should have been floats.
This commit is contained in:
@@ -33,13 +33,13 @@ public abstract class AbstractCubicCurve implements ICubicCurve
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override // from interface ICubicCurve
|
@Override // from interface ICubicCurve
|
||||||
public double getFlatnessSq () {
|
public float getFlatnessSq () {
|
||||||
return CubicCurves.getFlatnessSq(getX1(), getY1(), getCtrlX1(), getCtrlY1(),
|
return CubicCurves.getFlatnessSq(getX1(), getY1(), getCtrlX1(), getCtrlY1(),
|
||||||
getCtrlX2(), getCtrlY2(), getX2(), getY2());
|
getCtrlX2(), getCtrlY2(), getX2(), getY2());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override // from interface ICubicCurve
|
@Override // from interface ICubicCurve
|
||||||
public double getFlatness () {
|
public float getFlatness () {
|
||||||
return CubicCurves.getFlatness(getX1(), getY1(), getCtrlX1(), getCtrlY1(),
|
return CubicCurves.getFlatness(getX1(), getY1(), getCtrlX1(), getCtrlY1(),
|
||||||
getCtrlX2(), getCtrlY2(), getX2(), getY2());
|
getCtrlX2(), getCtrlY2(), getX2(), getY2());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ public abstract class AbstractRectangle extends RectangularShape implements IRec
|
|||||||
public boolean contains (float rx, float ry, float rw, float rh) {
|
public boolean contains (float rx, float ry, float rw, float rh) {
|
||||||
if (isEmpty()) return false;
|
if (isEmpty()) return false;
|
||||||
|
|
||||||
double x1 = getX(), y1 = getY(), x2 = x1 + getWidth(), y2 = y1 + getHeight();
|
float x1 = getX(), y1 = getY(), x2 = x1 + getWidth(), y2 = y1 + getHeight();
|
||||||
return (x1 <= rx) && (rx + rw <= x2) && (y1 <= ry) && (ry + rh <= y2);
|
return (x1 <= rx) && (rx + rw <= x2) && (y1 <= ry) && (ry + rh <= y2);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -122,7 +122,7 @@ public abstract class AbstractRectangle extends RectangularShape implements IRec
|
|||||||
public boolean intersects (float rx, float ry, float rw, float rh) {
|
public boolean intersects (float rx, float ry, float rw, float rh) {
|
||||||
if (isEmpty()) return false;
|
if (isEmpty()) return false;
|
||||||
|
|
||||||
double x1 = getX(), y1 = getY(), x2 = x1 + getWidth(), y2 = y1 + getHeight();
|
float x1 = getX(), y1 = getY(), x2 = x1 + getWidth(), y2 = y1 + getHeight();
|
||||||
return (rx + rw > x1) && (rx < x2) && (ry + rh > y1) && (ry < y2);
|
return (rx + rw > x1) && (rx < x2) && (ry + rh > y1) && (ry < y2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -47,11 +47,11 @@ public interface ICubicCurve extends IShape, Cloneable
|
|||||||
|
|
||||||
/** Returns the square of the flatness (maximum distance of a control point from the line
|
/** Returns the square of the flatness (maximum distance of a control point from the line
|
||||||
* connecting the end points) of this curve. */
|
* connecting the end points) of this curve. */
|
||||||
double getFlatnessSq ();
|
float getFlatnessSq ();
|
||||||
|
|
||||||
/** Returns the flatness (maximum distance of a control point from the line connecting the end
|
/** Returns the flatness (maximum distance of a control point from the line connecting the end
|
||||||
* points) of this curve. */
|
* points) of this curve. */
|
||||||
double getFlatness ();
|
float getFlatness ();
|
||||||
|
|
||||||
/** Subdivides this curve and stores the results into {@code left} and {@code right}. */
|
/** Subdivides this curve and stores the results into {@code left} and {@code right}. */
|
||||||
void subdivide (CubicCurve left, CubicCurve right);
|
void subdivide (CubicCurve left, CubicCurve right);
|
||||||
|
|||||||
Reference in New Issue
Block a user