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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: "Nasser M. Abbasi" Newsgroups: comp.lang.ada Subject: Re: Many overlook the possibility sin(x,360.0) ? Date: Mon, 1 May 2017 12:46:02 -0500 Organization: Aioe.org NNTP Server Message-ID: References: <3e7f9789-a0af-4342-a42e-46a6258d7801@googlegroups.com> Reply-To: nma@12000.org NNTP-Posting-Host: 1UTCWaR+DiFXhVTGCDAw6A.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 X-Notice: Filtered by postfilter v. 0.8.2 Xref: news.eternal-september.org comp.lang.ada:46650 Date: 2017-05-01T12:46:02-05:00 List-Id: On 5/1/2017 12:22 AM, reinert wrote: > Hi, > > Not a big philosophical question, but: > > I have often seen in (others) Ada code that many prefer to use for example sin(x) >where they first calculate x := rad_per_degree*degrees. > > Why they do not use sin(degrees,360.0) if they need to use degree. >Are there a good reason? Using sin(x, 3600.0) seems to keep the code >simpler. Sometimes I even use sin(x,period). > > reinert > btw, These are implemented in other languages as follows: In Mathematica one can type Sin[ 360 Degree] in Matlab one uses sind(360) instead of sin() for degrees. --Nasser