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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,2a34b7ad6c6a0774 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!nntp.nethere.com!news.nethere.com.POSTED!not-for-mail NNTP-Posting-Date: Thu, 12 Aug 2010 02:54:53 -0500 Newsgroups: comp.lang.ada Subject: Re: Efficiency of code generated by Ada compilers From: csampson@inetworld.net (Charles H. Sampson) Date: Thu, 12 Aug 2010 00:54:52 -0700 Message-ID: <1jn36d6.se2f0g1edjjnyN%csampson@inetworld.net> References: <1jn1a4o.1dfllwo1uin3imN%csampson@inetworld.net> User-Agent: MacSOUP/2.8.2 (Mac OS X version 10.4.11 (PPC)) X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-qPBI4uo1YFvDoyNlHtObkqsBRHAeGdH9GjqGNvPR2DqsrUiIxNY3dKCI5UpsbLdSz09f57qszGztI9d!lV78Qro7zdH8OkduWqayjtOTkkTRflM6fNitB66pSuWp9FR7/slC/DQBVEDOwbhpEbZiAYx8SMN4!C+jh3mGr4s9C6ULIZ3KW37rA1nNflw== X-Complaints-To: abuse@nethere.com X-DMCA-Complaints-To: abuse@nethere.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 Xref: g2news1.google.com comp.lang.ada:13160 Date: 2010-08-12T00:54:52-07:00 List-Id: Simon Wright wrote: > csampson@inetworld.net (Charles H. Sampson) writes: > > > I then overloaded "+" and "-" for (Bearing, Turn_Angle) arguments > > and Bearing return value. In those functions is where the mod 360 > > occurred. (Actually, mod 360.0, as it were.) > > Depending on what is doing the turning, in our application that would > in some cases have to be mod 720.0 ... I'm puzzled. Unless you're very careful, intermediate calculations could result in a quasi-Bearing of more than 360 degrees but I'm pretty sure most programmers on my project would have been surprised to see a real bearing of 360 degrees or more. Charlie -- All the world's a stage, and most of us are desperately unrehearsed. Sean O'Casey