delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/03/25/20:07:20

Message-Id: <3.0.1.32.19970326014505.00e6fdc0@mail.student.utwente.nl>
Date: Wed, 26 Mar 1997 01:45:05 +0100
To: DBerry1 AT dca DOT gov DOT au
From: Erik Post <erik DOT post AT student DOT utwente DOT nl>
Subject: Re: Newbie troubles with Sin and Cos
Cc: djgpp AT delorie DOT com
In-Reply-To: <0000oqkoqioy.0000nzhphlnh@dca.gov.au>
Mime-Version: 1.0

At , you wrote:
>I'm trying to write a routine that spins a pixel around in a circle.  That 
>works ok so far, except that the X and Y points are never next to each 
>other - I think I have narrowed it down to the results I am getting from 
>using COS and SIN.

The cos and sin functions take and give radials (circle is 2*Pi rad). On
your calculator you used degrees (circle is 360 deg).
So, convert your numbers in the program to radials.

Erik Post
Student Computer Sciences at University of Twente, The Netherlands
e-mail: erik DOT post AT student DOT utwente DOT nl

- Raw text -


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