Lines Matching refs:x1

61         public float x1;
93 * @param x1 the X coordinate of the start point
99 public Float(float x1, float y1, float x2, float y2) {
100 setLine(x1, y1, x2, y2);
119 return (double) x1;
135 return new Point2D.Float(x1, y1);
166 public void setLine(double x1, double y1, double x2, double y2) {
167 this.x1 = (float) x1;
176 * @param x1 the X coordinate of the start point
182 public void setLine(float x1, float y1, float x2, float y2) {
183 this.x1 = x1;
195 if (x1 < x2) {
196 x = x1;
197 w = x2 - x1;
200 w = x1 - x2;
228 public double x1;
261 * @param x1 the X coordinate of the start point
267 public Double(double x1, double y1, double x2, double y2) {
268 setLine(x1, y1, x2, y2);
287 return x1;
303 return new Point2D.Double(x1, y1);
334 public void setLine(double x1, double y1, double x2, double y2) {
335 this.x1 = x1;
347 if (x1 < x2) {
348 x = x1;
349 w = x2 - x1;
352 w = x1 - x2;
433 * @param x1 the X coordinate of the start point
439 public abstract void setLine(double x1, double y1, double x2, double y2);
465 * {@code (x1,y1)} to {@code (x2,y2)}.
468 * first end point, {@code (x1,y1)}, in order to point at the
484 * lies "beyond {@code (x1,y1)}" or 1 if the point lies
487 * @param x1 the X coordinate of the start point of the
504 public static int relativeCCW(double x1, double y1,
508 x2 -= x1;
510 px -= x1;
524 // px and py need to have (x2 - x1) or (y2 - y1) subtracted
578 * Tests if the line segment from {@code (x1,y1)} to
582 * @param x1 the X coordinate of the start point of the first
603 public static boolean linesIntersect(double x1, double y1,
608 return ((relativeCCW(x1, y1, x2, y2, x3, y3) *
609 relativeCCW(x1, y1, x2, y2, x4, y4) <= 0)
610 && (relativeCCW(x3, y3, x4, y4, x1, y1) *
615 * Tests if the line segment from {@code (x1,y1)} to
618 * @param x1 the X coordinate of the start point of the
630 public boolean intersectsLine(double x1, double y1, double x2, double y2) {
631 return linesIntersect(x1, y1, x2, y2,
655 * @param x1 the X coordinate of the start point of the
672 public static double ptSegDistSq(double x1, double y1,
676 // Adjust vectors relative to x1,y1
677 // x2,y2 becomes relative vector from x1,y1 to end of segment
678 x2 -= x1;
680 // px,py becomes relative vector from x1,y1 to test point
681 px -= x1;
686 // px,py is on the side of x1,y1 away from x2,y2
692 // x2,y2 are already the negative of x1,y1=>x2,y2
700 // px,py is on the side of x2,y2 away from x1,y1
705 // px,py is between x1,y1 and x2,y2
707 // projected on the x2,y2=>x1,y1 vector times the
708 // length of the x2,y2=>x1,y1 vector
730 * @param x1 the X coordinate of the start point of the
747 public static double ptSegDist(double x1, double y1,
751 return Math.sqrt(ptSegDistSq(x1, y1, x2, y2, px, py));
841 * @param x1 the X coordinate of the start point of the specified line
854 public static double ptLineDistSq(double x1, double y1,
858 // Adjust vectors relative to x1,y1
859 // x2,y2 becomes relative vector from x1,y1 to end of segment
860 x2 -= x1;
862 // px,py becomes relative vector from x1,y1 to test point
863 px -= x1;
867 // projected on the x1,y1=>x2,y2 vector times the
868 // length of the x1,y1=>x2,y2 vector
886 * @param x1 the X coordinate of the start point of the specified line
899 public static double ptLineDist(double x1, double y1,
903 return Math.sqrt(ptLineDistSq(x1, y1, x2, y2, px, py));