www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/12/30/00:17:49

From: "Marp" <Marp AT 0 DOT 0 DOT 0 DOT 0>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Inverse trigonometry functions in Djgpp
Date: Wed, 29 Dec 1999 22:45:44 -0500
Organization: MindSpring Enterprises
Lines: 30
Message-ID: <84ekhk$qr2$1@nntp5.atl.mindspring.net>
References: <wKza4.591$eq DOT 7079 AT uutiset DOT nic DOT fi>
NNTP-Posting-Host: c7.b7.cf.47
X-Server-Date: 30 Dec 1999 03:45:56 GMT
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-Mimeole: Produced By Microsoft MimeOLE V5.00.2314.1300
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

The trig functions require measurements in radians, not degrees. I think the
way to convert the measurements is:

radians = degrees * (PI / 180)
degrees = radians * (180 / PI)

Jarkko Kähkönen <jarkko DOT kahkonen AT mbnet DOT fi> wrote in message
news:wKza4.591$eq DOT 7079 AT uutiset DOT nic DOT fi...
> Atan () - don't work!
> Here is a bit of my code:
>
> float direction;
>
> direction = atan ( 120 / 90 );
> printf ("%f", direction");
>
> And output is this:
> 0.927295
>
> But with calculator it is:
> tan^-1 (120 / 90) = 53.1301023...
>
> Is atan () right inverse tan function?
>
> Greetings,
> Jarkko DOT Kahkonen AT mbnet DOT REMOVETHAT DOT fi
>
>


- Raw text -


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