Beispiel #1
0
 static void solve() {
   String[] s = in.next().split(",");
   Point p =
       reflect(
           new Line(
               Double.parseDouble(s[0]),
               Double.parseDouble(s[1]),
               Double.parseDouble(s[2]),
               Double.parseDouble(s[3])),
           new Point(Double.parseDouble(s[4]), Double.parseDouble(s[5])));
   out.println(p.getX() + " " + p.getY());
 }
Beispiel #2
0
 public String toString() {
   return "[(" + p1.getX() + "," + p1.getY() + "),(" + p2.getX() + "," + p2.getY() + ")]";
 }
Beispiel #3
0
 public double getY2() {
   return p2.getY();
 }
Beispiel #4
0
 public double getY1() {
   return p1.getY();
 }
Beispiel #5
0
 public Vector plus(Point p) {
   return new Vector(this.x + p.getX(), this.y + p.getY());
 }
Beispiel #6
0
 public Vector(Point target, Point source) {
   this.x = target.getX() - source.getX();
   this.y = target.getY() - source.getY();
 }