OpenEndedGroup / Field

A development environment for art
201 stars 22 forks source link

No methods for signed vector angle or FLine.contains() #29

Closed highfellow closed 11 years ago

highfellow commented 11 years ago

This is just a feature request for a couple of methods that I think would be useful.

Vector2.angle(vect2) doesn't return a sign, which makes it hard to rotate something in 2D by the angle between two vectors. I had to find a workaround for this.

I can't find a 'contains point / line' method for FLines. I may have missed something but this would be useful too.

marcdownie commented 11 years ago

for intersection testing convert the FLine to a (java) Area:

myFLine.toArea2().contains(x,y)

Cache that toArea2() if you are going to do call contains a lot.

highfellow commented 11 years ago

Cheers for the signedAngle method and the API help.