comp.lang.ada
 help / color / mirror / Atom feed
From: reinert <reinkor@gmail.com>
Subject: Re: Many overlook the possibility sin(x,360.0) ?
Date: Mon, 8 May 2017 10:37:30 -0700 (PDT)
Date: 2017-05-08T10:37:30-07:00	[thread overview]
Message-ID: <3f68d354-5bc4-4ede-ab4d-a7985bcf596c@googlegroups.com> (raw)
In-Reply-To: <oec07s$an6$1@gioia.aioe.org>

On Wednesday, May 3, 2017 at 9:18:23 AM UTC+2, Dmitry A. Kazakov wrote:
> On 03/05/2017 06:12, reinert wrote:
> 

> 
> I would rather:
> 
> declare
>     Points   : constant := 36;
>     To_Angle : constant Real := 2.0 * Pi / Real (Points);
> begin
>     for i in 0..Points - 1 loop
>        declare
>           Angle : constant Real := Real (I) * To_Angle;
>        begin
>           vertex (radius * (cos (Angle), sin (Angle)));
>        end;
>     end loop;
> end;
> 

It depends on the perception of cos/sin (could also use complex exponent to make it even shorter).

reinert

      reply	other threads:[~2017-05-08 17:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-01  5:22 Many overlook the possibility sin(x,360.0) ? reinert
2017-05-01  8:50 ` hreba
2017-05-01 17:46 ` Nasser M. Abbasi
2017-05-01 20:04   ` Dmitry A. Kazakov
2017-05-01 20:46     ` Shark8
2017-05-02  6:37       ` reinert
2017-05-02  8:35         ` Dmitry A. Kazakov
2017-05-03  4:12           ` reinert
2017-05-03  7:18             ` Dmitry A. Kazakov
2017-05-08 17:37               ` reinert [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox