functionintersectionsPolygonLine

Returns the vector of intersections between a polygon and a line

Inputs

TypeNameDefaultDescription
Real[:,2]polygonPolygon
Realx0_RLine origin abscissa
Realy0_RLine origin ordinate
Reala_RLine direction abscissa
Realb_RLine direction ordinate
Realtolerance0Tolerance

Outputs

TypeNameDefaultDescription
Real[size(polygon, 1)]intVector of intersection points on line
IntegernNumber of intersection points. If -1, the result is undecided