public static PolarPoint ToPolar(this Point cartesian) { double r = cartesian.Magnitude(); double θ = Math.Atan2(cartesian.Y, cartesian.X); return(new PolarPoint(r, θ)); }