public PointE TransformByRotationAbout(double rotation, PointE center)
{
PointE t = this - center; // translate to origin
// apply rotation matrix cos x -sin x
// sin x cos x which rotates about origin
double cos = Math.Cos(rotation);
double sin = Math.Sin(rotation);
t = new PointE(cos * t.X - sin * t.Y, sin * t.X + cos * t.Y);
return t + center; // translate back
}