Blitz angle rotations.
BlitzPlus Forums/BlitzPlus Programming/Blitz angle rotations.
| ||
Hi there, I'm in the middle of writing some vector graphics code and have got myself into a right muddle with angle rotations using Sin/Cos. First of all, I thought that a zero angle would be straight up, as normal. However, if I remember my maths correctly (which is doubtful), the zero angle is to the right, i.e. ninety degrees and rotation is counter-clockwise. In the blitz docs, there is some demo code that supports this (attached link ANGLES.BB), except that the angle of rotation is clockwise. I wrote some code of my own to check this (attached link CIRCLE.BB) and shockingly, the zero angle starts at 180 degrees and rotates counter-clockwise. http://www.tronsoftware.dabsol.co.uk/downloads/AngleProggies.zip Now, I don't know what to think. Little help? Is my code wrong somehow? Thanks for reading. Rage_Matrix |
| ||
In Angles.bb Cos is used for x and Sin for y. You did it the other way around in Circle.bb; Sin for x and Cos for y. |
| ||
Doh....thanks. This now backs my assumption that Blitz angles start from 90 degrees. :) |