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

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:53 -0800
Organization: Alcyone Systems
Lines: 22
Message-ID: <3338C315.5EE840CF@alcyone.com>
References: <0000oqkoqioy DOT 0000nzhphlnh AT dca DOT gov DOT au> <33387369 DOT 3126 AT CyberServices DOT Com>
NNTP-Posting-Host: newton.alcyone.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Neil Stone wrote:

> As far as I know the 'C' sin, cos, tan functions return and accept there
> parameters in radians rather than degrees.

Correct.  This is true of most programming languages, actually.

> I know there is a
> simple formular to convert radians to degrees and vice-versa but I don't
> know it (I don't use the sin, cos, etc functions that much), sorry. Does
> anybody know it, I sure some one does, I might need it myself at some
> point.

There are pi rad in 180 deg, so to convert deg to rad, multiply by 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