package ru.stqa.pft.lesson1;

/**
 * Created by DiTheGrey on 12.09.2016.
 */
public class Point {

  public double x;
  public double y;

  public Point(double x, double y) {
    this.x = x;
    this.y = y;
  }


  public static double distance(Point p1, Point p2) {
    return Math.sqrt(Math.pow(p2.x - p1.x, 2) + Math.pow(p2.y - p1.y, 2));
  }


public static class Length {

  Point p1, p2;
  Length (Point p1, Point p2) {
    this.p1 = p1;
    this.p2 = p2;
  }
  public double distance() {
    return Math.sqrt(Math.pow(p2.x - p1.x, 2) + Math.pow(p2.y - p1.y, 2));
  }

}
}