http://GameProgrammer.Com

Programming

GP Mailing List
     Thread Index
     Date Index

ATXGPSIG List
     Thread Index
     Date Index

Google
>

Home

TheGrumpyProgrammer



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Trouble with raycasting in Turbo C



Lionel-

I'm going to assume you have a function somewhat like this:

int function(int number, int divisor)
{
  return (int)(number%divisor);
}

And then use it here:

>xinc = sangle[<function here>(tmp, 360)] / 100;

You might want to try typecasting, if it helps:

xinc = (double)(sangle[function(tmp,360)] / 100)

As far as I know, that should work.

-Brian
________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com

=================================================================
The GameProgrammer.Com mailing list is for the open discussion
of any topic related to the art, science, and business of
programming games. This list is especially tolerant of beginners.
We were all beginners once

To SUBSCRIBE or UNSUBSCRIBE please visit:
http://gameprogrammer.com/mailinglist.html