Sudha247 / ocaml-joy

MIT License
22 stars 14 forks source link

Implemented Polygon type + refactored Rectangle to make use of it #69

Closed FayCarsons closed 9 months ago

FayCarsons commented 10 months ago

Linked issue: https://github.com/Sudha247/ocaml-joy/issues/59

Implemented N-sided polygon type, functions, etc. Not covered in 'scale' because implementation may change soon. Refactored rectangle to be a specific case of a 4-sided polygon so that it may be transformed more easily. Exposed 'point' type to make polygon construction easier and for destructuring etc in sketches.

FayCarsons commented 10 months ago

Fixed conflicts & applied suggestions. Ran dune fmt. Should be good to go!