delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/03/26/05:34:29

From: Erik Max Francis <max AT alcyone DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Newbie troubles with Sin and Cos
Date: Tue, 25 Mar 1997 22:32:57 -0800
Organization: Alcyone Systems
Lines: 21
Message-ID: <3338C319.1992D124@alcyone.com>
References: <TCPSMTP DOT 17 DOT 3 DOT 25 DOT -13 DOT 20 DOT 10 DOT 2778967005 DOT 292016 AT salnet DOT salnet DOT org> <33388E03 DOT F47 AT abc DOT se>
NNTP-Posting-Host: newton.alcyone.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Kjell Franzen wrote:

> That have to be PI/180 to be correct, no? If You multiply by 180/PI the
> angle would be be about 57 times greater instead of 57 times smaller.
> (1 radian equals about 57,3 degrees).
> 
> > This changes the line from your example to
> >
> >   result = sin(theta*180/PI)
>                        ^^^^^^ should be : PI/180

Simple dimensional analysis.  pi rad = 180 deg, so deg times (pi rad/180
deg) gives rad.  You are correct; the conversion factor is pi/180.

-- 
       Erik Max Francis, &tSftDotIotE / email:  max AT alcyone DOT com
                     Alcyone Systems /    web:  http://www.alcyone.com/max/
San Jose, California, United States /    icbm:  37 20 07 N  121 53 38 W
                                   \
              "I am become death, / destroyer of worlds."
                                 / J. Robert Oppenheimer (quoting legend)

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019