testXYPolygonTurningDirections MethodStatic

Test the direction of turn at the vertices of the polygon, ignoring z-coordinates.

  • For a polygon without self intersections, this is a convexity and orientation test: all positive is convex and counterclockwise, all negative is convex and clockwise
  • Beware that a polygon which turns through more than a full turn can cross itself and close, but is not convex
  • Returns 1 if all turns are to the left, -1 if all to the right, and 0 if there are any zero or reverse turns

testXYPolygonTurningDirections(pPointArray: Point2d[] | Point3d[]): number

Parameter Type Description
pPointArray Point2d[] | Point3d[]  

Returns - number

Defined in

Last Updated: 13 June, 2024