ポイントからラインまでの距離を計算する必要があります(ラインかラインセグメントかを確認してください)。ブール関数IsSegmentが正しく機能しているかどうかはわかりません。提案はありますか?ありがとうございました。
double Distance_From_Line_to_Point(int *a, int *b, int *c, bool IsSegment) {
    double distance;
    int dot1;
    int dot2;
    distance = Cross_Product(a, b, c) / Distance(a, b);
    if (IsSegment(a,b,c) == true) {
        dot1 = Dot_Product(a, b, c);
        if (dot1 > 0) {
            return Distance(b, c);
        }
        dot2 = Dot_Product(b, a, c);
        if (dot2 > 0) {
            return Distance(a, c);
        }
    }
    return fabs(distance);
}
bool IsSegment(int *a, int *b, int *c) {
    double angle1;
    double angle2;
    angle1 = atan(double(b[1] - a[1]) / (b[0] - a[0]));
    angle2 = atan(double(c[1] - b[1]) / (c[0] - b[0]));
    if ((angle2 - angle1) * (180 / PI) > 90) {
        return false;
    }
    return true;
}