From: venturf AT gwis2 DOT circ DOT gwu DOT edu (Umberto Michelucci) Newsgroups: comp.os.msdos.djgpp,comp.lang.c Subject: Re: trigonometry problem (math.h) Followup-To: comp.os.msdos.djgpp,comp.lang.c Date: 4 Mar 1998 03:26:25 GMT Organization: The George Washington University, Washington DC Lines: 47 Message-ID: <6dihl1$gri37@beaker.nit.gwu.edu> References: <34FC314E DOT A9B3F9D6 AT usa DOT net> NNTP-Posting-Host: gwis2.circ.gwu.edu To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk I don't know what x is, but anyway, at the beginning of the file you should put #include then your the function sin () si just this sin(double angle), so your equation is voy=x*sin(angle); then, when compiling you should link to the library m. So you type -lm to link. Hoping to be useful. If you have any other question feel free to ask me. Umberto Michelucci ======================================================================= // | /\ /| Umberto Michelucci // | / \/ | umich AT gwis2 DOT circ DOT gwu DOT edu // | / | /_______| / | "The nature can write code up to 10 lines per minute..." (Freely taken from P.Bock) ======================================================================= 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. : Thanks in advance : Jesse