Help me, pls
Please help to stupid goat.
My solution:
if AtSegm(A, B, CrossLine(PointsToLine(A, B), PerLine(PointsToLine(A, B), C)))
then Writeln(NullOrNum( Dist(CrossLine(PointsToLine(A, B), PerLine(PointsToLine(A, B), C)), C) -len) : 0 : 2)
else Writeln(NullOrNum(min(Dist(A, C), Dist(B, C))-len) : 0 : 2);
Writeln(NullOrNum(max(Dist(A, C), Dist(B, C))-len) : 0 : 2);
where
AtSegm(A, B, C) - point locate on segment
PerLine(L) - perpendicular of L
NullOrNum(x) = max(0, x)
Dist(A, B) - distantion between points A and B
len - length of rope
Where may be bug?