Lines Matching defs:px

464      * {@code (px,py)} lies with respect to the line segment from
469 * specified point {@code (px,py)}.
495 * @param px the X coordinate of the specified point to be
506 double px, double py)
510 px -= x1;
512 double ccw = px * y2 - py * x2;
516 // relative value using the projection of px,py onto the
520 ccw = px * x2 + py * y2;
524 // px and py need to have (x2 - x1) or (y2 - y1) subtracted
529 px -= x2;
531 ccw = px * x2 + py * y2;
542 * {@code (px,py)} lies with respect to this line segment.
546 * @param px the X coordinate of the specified point
555 public int relativeCCW(double px, double py) {
556 return relativeCCW(getX1(), getY1(), getX2(), getY2(), px, py);
663 * @param px the X coordinate of the specified point being
674 double px, double py)
680 // px,py becomes relative vector from x1,y1 to test point
681 px -= x1;
683 double dotprod = px * x2 + py * y2;
686 // px,py is on the side of x1,y1 away from x2,y2
687 // distance to segment is length of px,py vector
693 // to get px,py to be the negative of px,py=>x2,y2
696 px = x2 - px;
698 dotprod = px * x2 + py * y2;
700 // px,py is on the side of x2,y2 away from x1,y1
701 // distance to segment is length of (backwards) px,py vector
705 // px,py is between x1,y1 and x2,y2
706 // dotprod is the length of the px,py vector
716 double lenSq = px * px + py * py - projlenSq;
738 * @param px the X coordinate of the specified point being
749 double px, double py)
751 return Math.sqrt(ptSegDistSq(x1, y1, x2, y2, px, py));
761 * @param px the X coordinate of the specified point being
770 public double ptSegDistSq(double px, double py) {
771 return ptSegDistSq(getX1(), getY1(), getX2(), getY2(), px, py);
801 * @param px the X coordinate of the specified point being
810 public double ptSegDist(double px, double py) {
811 return ptSegDist(getX1(), getY1(), getX2(), getY2(), px, py);
845 * @param px the X coordinate of the specified point being
856 double px, double py)
862 // px,py becomes relative vector from x1,y1 to test point
863 px -= x1;
865 double dotprod = px * x2 + py * y2;
866 // dotprod is the length of the px,py vector
872 double lenSq = px * px + py * py - projlenSq;
890 * @param px the X coordinate of the specified point being
901 double px, double py)
903 return Math.sqrt(ptLineDistSq(x1, y1, x2, y2, px, py));
913 * @param px the X coordinate of the specified point being
922 public double ptLineDistSq(double px, double py) {
923 return ptLineDistSq(getX1(), getY1(), getX2(), getY2(), px, py);
953 * @param px the X coordinate of the specified point being
962 public double ptLineDist(double px, double py) {
963 return ptLineDist(getX1(), getY1(), getX2(), getY2(), px, py);