Imagine you have two points in 2d space and you need to rotate one of these points by X degrees with the other point acting as a center.
float distX = Math.a
You need a 2-d rotation matrix http://en.wikipedia.org/wiki/Rotation_matrix
Your new point will be
newX = centerX + ( cosX * (point2X-centerX) + sinX * (point2Y -centerY))
newY = centerY + ( -sinX * (point2X-centerX) + cosX * (point2Y -centerY))
because you are rotating clockwise rather than anticlockwise