Lines Matching refs:y2

82         public float y2;
96 * @param y2 the Y coordinate of the end point
99 public Float(float x1, float y1, float x2, float y2) {
100 setLine(x1, y1, x2, y2);
151 return (double) y2;
159 return new Point2D.Float(x2, y2);
166 public void setLine(double x1, double y1, double x2, double y2) {
170 this.y2 = (float) y2;
179 * @param y2 the Y coordinate of the end point
182 public void setLine(float x1, float y1, float x2, float y2) {
186 this.y2 = y2;
202 if (y1 < y2) {
204 h = y2 - y1;
206 y = y2;
207 h = y1 - y2;
249 public double y2;
264 * @param y2 the Y coordinate of the end point
267 public Double(double x1, double y1, double x2, double y2) {
268 setLine(x1, y1, x2, y2);
319 return y2;
327 return new Point2D.Double(x2, y2);
334 public void setLine(double x1, double y1, double x2, double y2) {
338 this.y2 = y2;
354 if (y1 < y2) {
356 h = y2 - y1;
358 y = y2;
359 h = y1 - y2;
436 * @param y2 the Y coordinate of the end point
439 public abstract void setLine(double x1, double y1, double x2, double y2);
465 * {@code (x1,y1)} to {@code (x2,y2)}.
485 * "beyond {@code (x2,y2)}".
493 * @param y2 the Y coordinate of the end point of the
505 double x2, double y2,
509 y2 -= y1;
512 double ccw = px * y2 - py * x2;
520 ccw = px * x2 + py * y2;
522 // Reverse the projection to be relative to the original x2,y2
523 // x2 and y2 are simply negated.
524 // px and py need to have (x2 - x1) or (y2 - y1) subtracted
527 // point is "beyond (x2,y2)", then we want to calculate
528 // the inverse anyway - thus we leave x2 & y2 negated.
530 py -= y2;
531 ccw = px * x2 + py * y2;
579 * {@code (x2,y2)} intersects the line segment from {@code (x3,y3)}
588 * @param y2 the Y coordinate of the end point of the first
604 double x2, double y2,
608 return ((relativeCCW(x1, y1, x2, y2, x3, y3) *
609 relativeCCW(x1, y1, x2, y2, x4, y4) <= 0)
611 relativeCCW(x3, y3, x4, y4, x2, y2) <= 0));
616 * {@code (x2,y2)} intersects this line segment.
624 * @param y2 the Y coordinate of the end point of the
630 public boolean intersectsLine(double x1, double y1, double x2, double y2) {
631 return linesIntersect(x1, y1, x2, y2,
661 * @param y2 the Y coordinate of the end point of the
673 double x2, double y2,
677 // x2,y2 becomes relative vector from x1,y1 to end of segment
679 y2 -= y1;
683 double dotprod = px * x2 + py * y2;
686 // px,py is on the side of x1,y1 away from x2,y2
691 // switch to backwards vectors relative to x2,y2
692 // x2,y2 are already the negative of x1,y1=>x2,y2
693 // to get px,py to be the negative of px,py=>x2,y2
697 py = y2 - py;
698 dotprod = px * x2 + py * 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
709 projlenSq = dotprod * dotprod / (x2 * x2 + y2 * y2);
736 * @param y2 the Y coordinate of the end point of the
748 double x2, double y2,
751 return Math.sqrt(ptSegDistSq(x1, y1, x2, y2, px, py));
844 * @param y2 the Y coordinate of the end point of the specified line
855 double x2, double y2,
859 // x2,y2 becomes relative vector from x1,y1 to end of segment
861 y2 -= y1;
865 double dotprod = px * x2 + py * y2;
867 // projected on the x1,y1=>x2,y2 vector times the
868 // length of the x1,y1=>x2,y2 vector
869 double projlenSq = dotprod * dotprod / (x2 * x2 + y2 * y2);
889 * @param y2 the Y coordinate of the end point of the specified line
900 double x2, double y2,
903 return Math.sqrt(ptLineDistSq(x1, y1, x2, y2, px, py));