Lines Matching refs:y1

68         public float y1;
94 * @param y1 the Y coordinate of the start point
99 public Float(float x1, float y1, float x2, float y2) {
100 setLine(x1, y1, x2, y2);
127 return (double) y1;
135 return new Point2D.Float(x1, y1);
166 public void setLine(double x1, double y1, double x2, double y2) {
168 this.y1 = (float) y1;
177 * @param y1 the Y coordinate of the start point
182 public void setLine(float x1, float y1, float x2, float y2) {
184 this.y1 = y1;
202 if (y1 < y2) {
203 y = y1;
204 h = y2 - y1;
207 h = y1 - y2;
235 public double y1;
262 * @param y1 the Y coordinate of the start point
267 public Double(double x1, double y1, double x2, double y2) {
268 setLine(x1, y1, x2, y2);
295 return y1;
303 return new Point2D.Double(x1, y1);
334 public void setLine(double x1, double y1, double x2, double y2) {
336 this.y1 = y1;
354 if (y1 < y2) {
355 y = y1;
356 h = y2 - y1;
359 h = y1 - y2;
434 * @param y1 the Y 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
489 * @param y1 the Y coordinate of the start point of the
504 public static int relativeCCW(double x1, double y1,
509 y2 -= y1;
511 py -= y1;
524 // px and py need to have (x2 - x1) or (y2 - y1) subtracted
578 * Tests if the line segment from {@code (x1,y1)} to
584 * @param y1 the Y 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
620 * @param y1 the Y 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,
657 * @param y1 the Y 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
679 y2 -= y1;
680 // px,py becomes relative vector from x1,y1 to test point
682 py -= y1;
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
732 * @param y1 the Y 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));
842 * @param y1 the Y 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
861 y2 -= y1;
862 // px,py becomes relative vector from x1,y1 to test point
864 py -= y1;
867 // projected on the x1,y1=>x2,y2 vector times the
868 // length of the x1,y1=>x2,y2 vector
887 * @param y1 the Y 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));