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: Point3d[] | Point2d[]): number

Parameter Type Description
pPointArray Point3d[] | Point2d[]  

Returns - number

Defined in

Last Updated: 11 June, 2024