Post

 Resources 

Console


RE: Heres some code Adam Hoult (4 replies, 0 views) (2000-Jul-24)
-
Make sure however that your angles are in radians for COS and SIN to correctly use them. i.e Public Const g_DEGTORAD = 1.74532925199433E-02 Cos(Angle * g_DEGTORAD) Sin(Angle * g_DEGTORAD) if you don't want a const, you can always calculate the value of the degrees to radian multiplier my setting your radians variable by using the following formulas (formulii ??) =) pi = 4 * Atn(1) Radians = (2 * pi) / 360 then just use the radians variable in the same way as the function above. Of course it is quite processor intensive to have a MULT (iply) in every calculation, so it's always better to store your ANGLE of rotation precomputed in radians, instead of multiplying it each time. (depending on how freakish you are about optimisations =) Adam Sysop


-
Up One Level | Back to Forum

RE: Heres some code Stuart Zahn (3 replies) (2000-Jul-24)
RE: Heres some code Stuart Zahn (2 replies) (2000-Jul-24)
RE: Heres some code Spaghetti (1 reply) (2000-Jul-31)
RE: Heres some code Stuart Zahn (0 replies) (2000-Jul-31)

Copyright © 2002 - 2004 Eric Coleman, Peter Kuchnio , et. al.
There have been 47 visitors within the last 20 minutes
RSS News Feed