delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/03/03/18:02:44

From: fred AT genesis DOT demon DOT co DOT uk (Lawrence Kirby)
Newsgroups: comp.os.msdos.djgpp,comp.lang.c
Subject: Re: trigonometry problem (math.h)
Date: Tue, 03 Mar 98 21:45:07 GMT
Organization: none
Message-ID: <888961507snz@genesis.demon.co.uk>
References: <34FC314E DOT A9B3F9D6 AT usa DOT net> <6dhira$l7i$1 AT xenon DOT inbe DOT net>
Reply-To: fred AT genesis DOT demon DOT co DOT uk
Lines: 27
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

In article <6dhira$l7i$1 AT xenon DOT inbe DOT net>
           michelc AT jeeves DOT be DOT cut DOT this DOT tail "Michel Castelein" writes:

>Jesse Meyer <jesse-meyer AT usa DOT net> wrote:
>
>>I am writing some code to determine the vertical velocity of a
>>projectile.
>>The physics equation is voy = x (units/second) * sin(angle)
>>I want to design a program that will calculate this given the inital
>>velocity (x) and the angle.
>>I am using DJGPP v2.01 and RHIDE 1.4
>>This is basically a programming question because I am a begginer and all
>>the books I read don't go into using Trig with C.
>
>
>#include <stdio.h>    /* define printf() and scanf() */
>#include <math.h>     /* define M_PI and sin()       */

Note however that the C language does not permit a C compiler to define
M_PI in <math.h>.

-- 
-----------------------------------------
Lawrence Kirby | fred AT genesis DOT demon DOT co DOT uk
Wilts, England | 70734 DOT 126 AT compuserve DOT com
-----------------------------------------

- Raw text -


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