|
|
back to boardHelp 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? Re: Help me, pls Posted by awpris 6 Jul 2007 05:51 Here there should be still even one "else" ... |
|
|