/[classpath]/classpath/java/awt/geom/QuadCurve2D.java
ViewVC logotype

Diff of /classpath/java/awt/geom/QuadCurve2D.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.11 by smarothy, Sun Aug 1 22:27:36 2004 UTC revision 1.11.2.1 by gnu_andrew, Fri Jan 14 10:24:15 2005 UTC
# Line 59  import java.util.NoSuchElementException; Line 59  import java.util.NoSuchElementException;
59  public abstract class QuadCurve2D implements Shape, Cloneable  public abstract class QuadCurve2D implements Shape, Cloneable
60  {  {
61    private static final double BIG_VALUE = java.lang.Double.MAX_VALUE / 10.0;    private static final double BIG_VALUE = java.lang.Double.MAX_VALUE / 10.0;
62      private static final double EPSILON = 1E-10;
63    
64    /**    /**
65     * Constructs a new QuadCurve2D. Typical users will want to     * Constructs a new QuadCurve2D. Typical users will want to
# Line 962  public abstract class QuadCurve2D implem Line 963  public abstract class QuadCurve2D implem
963         If this is not done,bad behaviour may result for points on that axis. */         If this is not done,bad behaviour may result for points on that axis. */
964      if (a0 == 0.0 || a2 == 0.0)      if (a0 == 0.0 || a2 == 0.0)
965        {        {
966          double small = getFlatness() * (1E-10);          double small = getFlatness() * EPSILON;
967          if (a0 == 0.0)          if (a0 == 0.0)
968            a0 += small;            a0 -= small;
969    
970          if (a2 == 0.0)          if (a2 == 0.0)
971            a2 += small;            a2 -= small;
972        }        }
973    
974      r[0] = a0;      r[0] = a0;
# Line 990  public abstract class QuadCurve2D implem Line 991  public abstract class QuadCurve2D implem
991    
992      if (useYaxis)      if (useYaxis)
993        {        {
994          if (Line2D.linesIntersect(b0, a0, b2, a2, 0.0, 0.0, distance, 0.0))          if (Line2D.linesIntersect(b0, a0, b2, a2, EPSILON, 0.0, distance, 0.0))
995            nCrossings++;            nCrossings++;
996        }        }
997      else      else
998        {        {
999          if (Line2D.linesIntersect(a0, b0, a2, b2, 0.0, 0.0, 0.0, distance))          if (Line2D.linesIntersect(a0, b0, a2, b2, 0.0, EPSILON, 0.0, distance))
1000            nCrossings++;            nCrossings++;
1001        }        }
1002    

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.11.2.1

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26