math docs
    Preparing search index...

    Function containsPoint

    • Tests whether a point lies inside the triangle (a, b, c). Works for either winding order; points on an edge or vertex are considered inside.

      Parameters

      • a: vec2.Vec2

        the first vertex of the triangle.

      • b: vec2.Vec2

        the second vertex of the triangle.

      • c: vec2.Vec2

        the third vertex of the triangle.

      • point: vec2.Vec2

        the point to test.

      Returns boolean

      true if the point is inside (or on the boundary of) the triangle.