cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1997/07/16/19:18:08

From: Jari Oksanen <joksanen AT neopoli DOT lpt DOT fi>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: math.h sin() function returns wrong value
Date: Fri, 11 Jul 1997 09:12:35 +0300
Organization: Univ Helsinki
Lines: 10
Message-ID: <33C5CED3.4A41@neopoli.lpt.fi>
References: <01bc8d93$99a3f7a0$2a39868b AT dgmdavies>
NNTP-Posting-Host: neopc161.lpt.fi
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Gareth Davies wrote:
>   trigangle = angle * 1.40625;          /* conversion from an allegro fixed point
>   printf("trigangle = %f\n", trigangle);           style angle, out of 256 instead
> of 360 */

I think this should be
    triangle = angle * 0.024543926;
That means, sin() takes angle in radians instead of degrees. 
-- 
Jari Oksanen -- Lahtis, Finland / Luokta, Suopma / Lahti, Häme.

- Raw text -


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