#include <bits/stdc++.h>
#include <cmath>
using namespace std;

struct point{
    double x,y;
    point(double A,double B){
        x=A,y=B;
    }
    point() = default;
};

struct line{
    point point_A,point_B;
    line(point A,point B){
        point_A = A,point_B = B;
    }
    line() = default;
};

double getDistance(point P, line L){
    // P做线段垂直于AB上点O
    // 直角三角形面积 S=0.5*AB*OP
    // 则 OP = 2*S/AB

    // 两点间距离公式
    double AB = sqrt(pow(L.point_A.x-L.point_B.x,2)+pow(L.point_A.y-L.point_B.y,2));
    // 鞋带公式求三角形面积
    // S=0.5*abs((b-y1)*(x2-x1)-(a-x1)*(y2-y1))
    // 将AB和S带入
    double top = fabs((P.y-L.point_A.y)*(L.point_B.x-L.point_A.x)-(P.x-L.point_A.x)*(L.point_B.y-L.point_A.y));
    return top/AB;
}