Skip to content

Instantly share code, notes, and snippets.

@yishai-glide
Created September 3, 2015 06:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yishai-glide/61addecd633d0b89d18c to your computer and use it in GitHub Desktop.
Save yishai-glide/61addecd633d0b89d18c to your computer and use it in GitHub Desktop.
Point mCenter;
float mRadious;
public float animateToX(Point src, float deltaX) {
float newX = src.x + deltaX;
float newY = mCenter.y + Math.sqrt(Math.pow(mRadious, 2) - Math.pow(newX - mCenter.x), 2));
return newY;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment