From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,9fe315ab08ea9576 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.222.71 with SMTP id qk7mr5694326pbc.1.1328957162981; Sat, 11 Feb 2012 02:46:02 -0800 (PST) Path: wr5ni11991pbc.0!nntp.google.com!news1.google.com!postnews.google.com!n12g2000yqb.googlegroups.com!not-for-mail From: AdaMagica Newsgroups: comp.lang.ada Subject: Re: Arctan: to use with single or with double arguments? Date: Sat, 11 Feb 2012 02:46:02 -0800 (PST) Organization: http://groups.google.com Message-ID: References: <908e7aea-ed77-4dce-9f5d-e6341abc1303@s19g2000vbr.googlegroups.com> <53a2a6fa-9d48-4486-b5c7-aea81a026a82@x18g2000pro.googlegroups.com> <6e68502c-7ba3-43a5-9a3e-11ec3810c666@k10g2000yqk.googlegroups.com> NNTP-Posting-Host: 91.7.100.88 Mime-Version: 1.0 X-Trace: posting.google.com 1328957162 30636 127.0.0.1 (11 Feb 2012 10:46:02 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sat, 11 Feb 2012 10:46:02 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: n12g2000yqb.googlegroups.com; posting-host=91.7.100.88; posting-account=rmHyLAoAAADSQmMWJF0a_815Fdd96RDf User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-Header-Order: HUALENKRC X-HTTP-UserAgent: Mozilla/5.0 (Windows NT 6.0; rv:10.0) Gecko/20100101 Firefox/10.0,gzip(gfe) Content-Type: text/plain; charset=ISO-8859-1 Date: 2012-02-11T02:46:02-08:00 List-Id: On 11 Feb., 09:53, Simon Wright wrote: > Adam Beneschan writes: > > Yep, the arguments to Arctan in Ada (and I believe the arguments to > > ATAN2 in Fortran) are (Y, X). > > Which presents a fine opportunity for confusion when you're dealing with > Bearing (zero at North, positive clockwise); you say Arctan (X, Y). In this case, you always should use named associations to make the coordinate system clear - that's what named association is for. In code reviews, I wouldn't let Arctan (a, b) pass, but always force Arctan (Y => ..., X => ...). It's a severe bug to use positional association for Arctan!