Tw1ddle / geometrize-haxe

:triangular_ruler: Geometrize is a Haxe port of primitive that geometrizes images into geometric primitives
https://www.geometrize.co.uk/
Other
348 stars 31 forks source link

Do not clamp triangle mutation ? #20

Open Cerdic opened 5 years ago

Cerdic commented 5 years ago

I saw that triangles are clamped when mutating, to stay in the bounds https://github.com/Tw1ddle/geometrize-haxe/blob/master/geometrize/shape/Triangle.hx#L38

whereas they are not clamped in the constructor (corners 2 and 3 can be out of the bounds).

As a matter of fact it seems better to not clamp the corners while mutating, allowing to get partly out of the bound triangles, whereas this is now only possible to with initial random triangles