useflashpunk/FlashPunk — pull request #138 by jacobalbano (2014-05-08 20:47:02+00:00)
Title: Modify FP.anchorTo to support minimum distance

I added this for a game jam I worked on a while ago. We used it to keep a spaceship orbiting a planet (along with FP.rotateAround).

Thoughts? Flipping minDistance and maxDistance would have been better, but I wanted to keep the API consistent, hence the argument defaulting to NaN.