diff --git a/.classpath b/.classpath new file mode 100644 index 0000000..b4bee87 --- /dev/null +++ b/.classpath @@ -0,0 +1,6 @@ + + + + + + diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..eb5a316 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +target diff --git a/.project b/.project new file mode 100644 index 0000000..54eb3b4 --- /dev/null +++ b/.project @@ -0,0 +1,17 @@ + + + pythagoras + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/build.xml b/build.xml index 24f7d09..eac5fab 100644 --- a/build.xml +++ b/build.xml @@ -97,7 +97,7 @@ - diff --git a/src/main/java/pythagoras/f/AffineTransform.java b/src/main/java/pythagoras/f/AffineTransform.java index 5827cb5..43ae19f 100644 --- a/src/main/java/pythagoras/f/AffineTransform.java +++ b/src/main/java/pythagoras/f/AffineTransform.java @@ -65,9 +65,9 @@ public class AffineTransform implements Cloneable, Serializable /* * Method returns type of affine transformation. - * + * * Transform matrix is m00 m01 m02 m10 m11 m12 - * + * * According analytic geometry new basis vectors are (m00, m01) and (m10, * m11), translation vector is (m02, m12). Original basis vectors are (1, 0) * and (0, 1). Type transformations classification: TYPE_IDENTITY - new @@ -294,7 +294,7 @@ public class AffineTransform implements Cloneable, Serializable /** * Multiply matrix of two AffineTransform objects - * + * * @param t1 * - the AffineTransform object is a multiplicand * @param t2 diff --git a/src/main/java/pythagoras/f/Crossing.java b/src/main/java/pythagoras/f/Crossing.java index 975eca7..1c03b73 100644 --- a/src/main/java/pythagoras/f/Crossing.java +++ b/src/main/java/pythagoras/f/Crossing.java @@ -17,7 +17,7 @@ class Crossing /** * Solves quadratic equation - * + * * @param eqn the coefficients of the equation * @param res the roots of the equation * @return a number of roots @@ -50,7 +50,7 @@ class Crossing /** * Solves cubic equation - * + * * @param eqn the coefficients of the equation * @param res the roots of the equation * @return a number of roots @@ -103,7 +103,7 @@ class Crossing /** * Excludes double roots. Roots are double if they lies enough close with each other. - * + * * @param res the roots * @param rc the roots count * @return new roots count diff --git a/src/main/java/pythagoras/f/IShape.java b/src/main/java/pythagoras/f/IShape.java index 639881b..108cabe 100644 --- a/src/main/java/pythagoras/f/IShape.java +++ b/src/main/java/pythagoras/f/IShape.java @@ -19,13 +19,13 @@ public interface IShape boolean contains (IPoint point); /** Returns true if this shape completely contains the specified rectangle. */ - boolean contains (float x, float y, float w, float h); + boolean contains (float x, float y, float width, float height); /** Returns true if this shape completely contains the supplied rectangle. */ boolean contains (IRectangle r); /** Returns true if this shape intersects the specified rectangle. */ - boolean intersects (float x, float y, float w, float h); + boolean intersects (float x, float y, float width, float height); /** Returns true if this shape intersects the supplied rectangle. */ boolean intersects (IRectangle r); @@ -39,14 +39,14 @@ public interface IShape /** * Returns an iterator over the path described by this shape. - * + * * @param at if supplied, the points in the path are transformed using this. */ PathIterator getPathIterator (AffineTransform at); /** * Returns an iterator over the path described by this shape. - * + * * @param at if supplied, the points in the path are transformed using this. * @param flatness when approximating curved segments with lines, this controls the maximum * distance the lines are allowed to deviate from the approximated curve, thus a higher diff --git a/src/main/java/pythagoras/f/Lines.java b/src/main/java/pythagoras/f/Lines.java index 9e5cbf2..66cebc8 100644 --- a/src/main/java/pythagoras/f/Lines.java +++ b/src/main/java/pythagoras/f/Lines.java @@ -22,7 +22,7 @@ public class Lines // F = (x2-x3, y2-y3) = A-B // // Result is ((AxB) * (AxC) <= 0) and ((DxE) * (DxF) <= 0) - // + // // DxE = (C-B)x(-B) = BxB-CxB = BxC // DxF = (C-B)x(A-B) = CxA-CxB-BxA+BxB = AxB+BxC-AxC x2 -= x1; // A diff --git a/src/main/java/pythagoras/f/Path.java b/src/main/java/pythagoras/f/Path.java index 9bb2151..63f20c2 100644 --- a/src/main/java/pythagoras/f/Path.java +++ b/src/main/java/pythagoras/f/Path.java @@ -263,7 +263,7 @@ public final class Path implements IShape, Cloneable /** * Checks points and types buffer size to add pointCount points. If necessary realloc buffers * to enlarge size. - * + * * @param pointCount the point count to be added in buffer */ protected void checkBuf (int pointCount, boolean checkMove) { @@ -284,7 +284,7 @@ public final class Path implements IShape, Cloneable /** * Checks cross count according to path rule to define is it point inside shape or not. - * + * * @param cross the point cross count. * @return true if point is inside path, or false otherwise. */ diff --git a/src/main/java/pythagoras/f/Rectangle.java b/src/main/java/pythagoras/f/Rectangle.java index 79bc69a..8e1ca57 100644 --- a/src/main/java/pythagoras/f/Rectangle.java +++ b/src/main/java/pythagoras/f/Rectangle.java @@ -27,9 +27,7 @@ public class Rectangle extends AbstractRectangle implements Serializable * Constructs a rectangle at (0,0) and with dimensions (0,0). */ public Rectangle () { - } - - /** + } /** * Constructs a rectangle with the supplied upper-left corner and dimensions (0,0). */ public Rectangle (IPoint p) { @@ -182,7 +180,7 @@ public class Rectangle extends AbstractRectangle implements Serializable } @Override // from RectangularShape - public void setFrame (float x, float y, float w, float h) { - setBounds(x, y, w, h); + public void setFrame (float x, float y, float width, float height) { + setBounds(x, y, width, height); } } diff --git a/src/main/java/pythagoras/f/RectangularShape.java b/src/main/java/pythagoras/f/RectangularShape.java index af7f60a..1d0e608 100644 --- a/src/main/java/pythagoras/f/RectangularShape.java +++ b/src/main/java/pythagoras/f/RectangularShape.java @@ -13,7 +13,7 @@ public abstract class RectangularShape implements IRectangularShape /** * Sets the location and size of the framing rectangle of this shape to the specified values. */ - public abstract void setFrame (float x, float y, float w, float h); + public abstract void setFrame (float x, float y, float width, float height); /** * Sets the location and size of the framing rectangle of this shape to the supplied values.