Annotations for "Math.Atan Method (System)" topic.Fri, 11 Jul 2014 22:53:36 Z
http://msdn.microsoft.com/en-us/library/0007zs5t(v=vs.100).aspx#CommunityContent
ben_ob1Extending the Angle RangeBecause I always forget, and in case anyone else is interested, I thought I wouldadd this example:Since Math.Atan(double d) returns an angle that is between -π/2 and π/2, itdoes not cover all of the quadrants. To get the angle of a straight line(defined by 2 points) with a positive angle being anti-clockwise from the x-axis(with respect to a Cartesian coordinate system – rather than the screencoordinate system) then the following needs to be done to ensure that thecorrect angle is returned:publWed, 07 Dec 2011 12:09:51 -0800