This code looks fine. It uses a polar to rect conversion. An alternate approach (a bit more typical of Unity code) would be to use a Vector rotated around a point. Post your attempt at a C# conversion, and I'm sure we can help you over any rough spots. I see nothing out of the ordinary in the conversion.