40 std::srand(std::time(0));
44 int main(
int argc,
char **argv){
46 unsigned int runs = 400;
49 std::vector<double> xvalues(runs), yvalues(runs), zvalues(runs);
50 for (
unsigned int i = 0; i < runs ; i++ )
52 xvalues[i] = 1.0 * ((double) std::rand() - (double)RAND_MAX /2.0) /(double)RAND_MAX;
53 yvalues[i] = 1.0 * ((double) std::rand() - (double)RAND_MAX /2.0) /(double)RAND_MAX;
54 zvalues[i] = 1.0 * ((double) std::rand() - (double)RAND_MAX /2.0) /(double)RAND_MAX;
58 for (
unsigned int i = 0; i < runs ; i++ )
63 final = transform * initial;
64 std::printf(
"Useful Operator Overload: %f, angle between quaternions\n", initial.angle(
final));
int main(int argc, char **argv)
The Quaternion implements quaternion to perform linear algebra rotations in combination with Matrix3x...