Atan2 in C# (or similar lanaguge)
Can anyone point me to a good example of Atan2 defined in C# (or something vaguely close to C#) that doesn't use any internal math methods? This is on .NET Microframework, so there is no such thing as an internal math library. I have already defined Sin()/Cos(), but I am having a lot of trouble with Atain2. There are a few scatter shot math libraries in NETMF, but I have found them all to be flawed or broken. One of the major ones didn't even define PI correctly! An implementation should be quite straight forward starting with the definition on Wikipedia/atan2 and then using the infinite