I've tried subtracting three float vectors before and it works fine, but for some reason whenever I try to use the dbSubtractVector2(...) function my program always crashes. Perhaps this is a bug... or mabey im just doing something wrong.
Anyway here is the code and unless you've saved all your important data I recommend running it in debug mode
:
#include "DarkSDK.h"
void DarkSDK(void)
{
dbSyncOn();
// Make two new vectors:
dbMakeVector2(1);
dbMakeVector2(2);
dbMakeVector2(3);
// Set the vectors:
dbSetVector2(1,6,2);
dbSetVector2(2,4,9);
// This should store the result in vector 3... should it not?
dbSubtractVector2(3,2,1);
/* It isn't the loop which makes the program crash
while ( LoopSDK() && !dbEscapeKey() )
{
// Display the X component of the vector:
dbSetCursor(0,0);
dbPrint(dbXVector2(3));
dbSync(); // Update the screen
}
*/
return;
}
Anyhow thank-you for your time
!
[edit] Just wondering whether or not I should post this on the bug report board as well?