Confusing definition of atan2

From: Paul Floyd <Paul_Floyd_at_.....>
Date: Thu Apr 19 2007 - 03:15:36 PDT
Hi

In section 4.2.2 of the LRM, atan2 is defined as

atan2(x, y) Arc-tangent of x/y

Mathematically, this is correct, but to me it seems more conventional to 
reverse the order of x and y. When I started learning trigonometry, I 
was taught that tan is opposite over adjacent, or tan(t) = y/x, for a 
triangle like

   /|
  / |
 /  | y
/t  |
-----
 x

For the LRM definition, the triangle would have to be

   /|
  / |
 /  | x
/t  |
-----
  y

which I find a bit confusing.

In C, atan2 is declared as double atan2(double y, double x);

Regards
Paul
-- 
Dr Paul Floyd
Mentor Graphics Corporation


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Thu Apr 19 03:16:08 2007

This archive was generated by hypermail 2.1.8 : Thu Apr 19 2007 - 03:16:17 PDT