Sherlock and Geometry

  • + 0 comments

    I made a stupid error. When triangle lies inside the circle, but touches it by vertex, expectad answer is YES, don't be like me.

    The overall idea is to check trivial cases (triangle is fully inside, partly inside - check distances to vertices). Then, to detect touching by side, you can use distance from point to line and previous problem in Geometry section - Jim Beam.