The center point on polygons now maintains the axis of the dragged line
and, optionally with Ctrl pressed, maintains the slope of the adjacent
segments as well.
This also fixes a longstanding issue that prevented the ctrl-snapping
from using the original point rather than the last updated point when
constraining.
Fixes https://gitlab.com/kicad/code/kicad/issues/2465
* Split up the thirdparty code into the thirdparty folder (#3637)
* Create a new kimath static library containing all the math functions
This is part of cleaning the build system for #1906.
We prevent the creation of invalid polygons by keeping the converging
lines from intersecting. This test doesn't make sense for triangular
polygons as they always intersect and we want to allow them to move
outside of the singular point.
Fixes: lp:1831481
* https://bugs.launchpad.net/kicad/+bug/1831481
(cherry picked from commit 966173c129)