I have noticed that the coordinate system in Dark Basic stuff seems odd. I get strange angles when retrieving an objects angle. If plotted on a graph, the top terminal is 0 instead of 90 degrees. The next terminal to the right (clockwise) is 90 instead of 0. The next terminal is 180 instead of 270. The next is 270 instead of 180. Are the trig functions sin, cos, tan, arc sin, arc cos, arc tan adjusted accordingly, or not? I am trying to move an object sideways exactly. This requires the use of these functions. It doesn't work. Even though there are simpler ways to do this, I still really need to learn to use the angle math for other situations as well. Is this strange angle system the cause of my malfunctioning program? Has anyone else run in to this problem? If so what solutions have you found?

Here is a simple program that rotates a cube to illustrate my problem.

#include "DarkGDK.h"

void DarkGDK ( void )

{

dbSyncOn ( );

dbSyncRate ( 60 );

dbMakeObjectCube(1, 10);

while ( LoopGDK ( ) )

{

if ( dbLeftKey ( ) )

dbRotateObject ( 1, dbObjectAngleX ( 1 ), dbWrapValue(dbObjectAngleY ( 1 ) - 1), dbObjectAngleZ ( 1 ));

if ( dbRightKey ( ) )

dbRotateObject ( 1, dbObjectAngleX ( 1 ), dbWrapValue(dbObjectAngleY ( 1 ) + 1), dbObjectAngleZ ( 1 ));

dbText (10, 10, dbStr(dbObjectAngleY (1)));

// here we make a call to update the contents of the screen

dbSync ( );

}

// before quitting delete our objects

dbDeleteObject ( 1 );

// and now everything is ready to return back to Windows

return;