public void rotate(PointF p1,PointF p2,float angle){
  float px=p1.x;
  float py=p1.y;
  float ox=p2.x;
  float oy=p2.y;
  p1.x=(float)(Math.cos(angle) * (px - ox) - Math.sin(angle) * (py - oy) + ox);
  p1.y=(float)(Math.sin(angle) * (px - ox) + Math.cos(angle) * (py - oy) + oy);
}

public void rotate ( PointF p1 , PointF p2 , float angle ) { float px = p1 . x ; float py = p1 . y ; float ox = p2 . x ; float oy = p2 . y ; p1 . x = ( float ) ( Math . cos ( angle ) * ( px - ox ) - Math . sin ( angle ) * ( py - oy ) + ox ) ; p1 . y = ( float ) ( Math . sin ( angle ) * ( px - ox ) + Math . cos ( angle ) * ( py - oy ) + oy ) ; }
rotates p1 around p2 by angle degrees .
