Merge branch 'deadmoose'

This commit is contained in:
Michael Bayne
2011-06-10 15:25:44 -07:00
11 changed files with 42 additions and 20 deletions
+6
View File
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src/main/java"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
+1
View File
@@ -0,0 +1 @@
target
+17
View File
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>pythagoras</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
+1 -1
View File
@@ -97,7 +97,7 @@
</target> </target>
<property name="maven.install.repo" value="file://${user.home}/.m2/repository"/> <property name="maven.install.repo" value="file://${user.home}/.m2/repository"/>
<target name="install" depends="package" <target name="install" depends="package"
description="Deploys our build artifacts to a Maven repository."> description="Deploys our build artifacts to a Maven repository.">
<jar basedir="${src.dir}" destfile="${target.dir}/${ant.project.name}-sources.jar"/> <jar basedir="${src.dir}" destfile="${target.dir}/${ant.project.name}-sources.jar"/>
<artifact:deploy file="${target.dir}/${ant.project.name}.jar" uniqueVersion="false"> <artifact:deploy file="${target.dir}/${ant.project.name}.jar" uniqueVersion="false">
@@ -65,9 +65,9 @@ public class AffineTransform implements Cloneable, Serializable
/* /*
* Method returns type of affine transformation. * Method returns type of affine transformation.
* *
* Transform matrix is m00 m01 m02 m10 m11 m12 * Transform matrix is m00 m01 m02 m10 m11 m12
* *
* According analytic geometry new basis vectors are (m00, m01) and (m10, * According analytic geometry new basis vectors are (m00, m01) and (m10,
* m11), translation vector is (m02, m12). Original basis vectors are (1, 0) * m11), translation vector is (m02, m12). Original basis vectors are (1, 0)
* and (0, 1). Type transformations classification: TYPE_IDENTITY - new * 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 * Multiply matrix of two AffineTransform objects
* *
* @param t1 * @param t1
* - the AffineTransform object is a multiplicand * - the AffineTransform object is a multiplicand
* @param t2 * @param t2
+3 -3
View File
@@ -17,7 +17,7 @@ class Crossing
/** /**
* Solves quadratic equation * Solves quadratic equation
* *
* @param eqn the coefficients of the equation * @param eqn the coefficients of the equation
* @param res the roots of the equation * @param res the roots of the equation
* @return a number of roots * @return a number of roots
@@ -50,7 +50,7 @@ class Crossing
/** /**
* Solves cubic equation * Solves cubic equation
* *
* @param eqn the coefficients of the equation * @param eqn the coefficients of the equation
* @param res the roots of the equation * @param res the roots of the equation
* @return a number of roots * @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. * Excludes double roots. Roots are double if they lies enough close with each other.
* *
* @param res the roots * @param res the roots
* @param rc the roots count * @param rc the roots count
* @return new roots count * @return new roots count
+4 -4
View File
@@ -19,13 +19,13 @@ public interface IShape
boolean contains (IPoint point); boolean contains (IPoint point);
/** Returns true if this shape completely contains the specified rectangle. */ /** 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. */ /** Returns true if this shape completely contains the supplied rectangle. */
boolean contains (IRectangle r); boolean contains (IRectangle r);
/** Returns true if this shape intersects the specified rectangle. */ /** 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. */ /** Returns true if this shape intersects the supplied rectangle. */
boolean intersects (IRectangle r); boolean intersects (IRectangle r);
@@ -39,14 +39,14 @@ public interface IShape
/** /**
* Returns an iterator over the path described by this shape. * Returns an iterator over the path described by this shape.
* *
* @param at if supplied, the points in the path are transformed using this. * @param at if supplied, the points in the path are transformed using this.
*/ */
PathIterator getPathIterator (AffineTransform at); PathIterator getPathIterator (AffineTransform at);
/** /**
* Returns an iterator over the path described by this shape. * Returns an iterator over the path described by this shape.
* *
* @param at if supplied, the points in the path are transformed using this. * @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 * @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 * distance the lines are allowed to deviate from the approximated curve, thus a higher
+1 -1
View File
@@ -22,7 +22,7 @@ public class Lines
// F = (x2-x3, y2-y3) = A-B // F = (x2-x3, y2-y3) = A-B
// //
// Result is ((AxB) * (AxC) <= 0) and ((DxE) * (DxF) <= 0) // Result is ((AxB) * (AxC) <= 0) and ((DxE) * (DxF) <= 0)
// //
// DxE = (C-B)x(-B) = BxB-CxB = BxC // DxE = (C-B)x(-B) = BxB-CxB = BxC
// DxF = (C-B)x(A-B) = CxA-CxB-BxA+BxB = AxB+BxC-AxC // DxF = (C-B)x(A-B) = CxA-CxB-BxA+BxB = AxB+BxC-AxC
x2 -= x1; // A x2 -= x1; // A
+2 -2
View File
@@ -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 * Checks points and types buffer size to add pointCount points. If necessary realloc buffers
* to enlarge size. * to enlarge size.
* *
* @param pointCount the point count to be added in buffer * @param pointCount the point count to be added in buffer
*/ */
protected void checkBuf (int pointCount, boolean checkMove) { 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. * Checks cross count according to path rule to define is it point inside shape or not.
* *
* @param cross the point cross count. * @param cross the point cross count.
* @return true if point is inside path, or false otherwise. * @return true if point is inside path, or false otherwise.
*/ */
+3 -5
View File
@@ -27,9 +27,7 @@ public class Rectangle extends AbstractRectangle implements Serializable
* Constructs a rectangle at (0,0) and with dimensions (0,0). * Constructs a rectangle at (0,0) and with dimensions (0,0).
*/ */
public Rectangle () { public Rectangle () {
} } /**
/**
* Constructs a rectangle with the supplied upper-left corner and dimensions (0,0). * Constructs a rectangle with the supplied upper-left corner and dimensions (0,0).
*/ */
public Rectangle (IPoint p) { public Rectangle (IPoint p) {
@@ -182,7 +180,7 @@ public class Rectangle extends AbstractRectangle implements Serializable
} }
@Override // from RectangularShape @Override // from RectangularShape
public void setFrame (float x, float y, float w, float h) { public void setFrame (float x, float y, float width, float height) {
setBounds(x, y, w, h); setBounds(x, y, width, height);
} }
} }
@@ -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. * 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. * Sets the location and size of the framing rectangle of this shape to the supplied values.