Permalink
Browse files

version 0.2

  • Loading branch information...
lxdfigo
lxdfigo committed Oct 11, 2012
1 parent d9a1f4d commit d08b393da7a7bbcebdae05ec24ca23da93ac14bc
Showing with 213 additions and 241 deletions.
  1. BIN SimpleMath.ncb
  2. BIN SimpleMath.suo
  3. +5 −12 SimpleMath/main.cpp
  4. +204 −226 SimpleMath/quat.h
  5. +4 −3 SimpleMath/vector.h
View
Binary file not shown.
View
Binary file not shown.
View
@@ -2,21 +2,14 @@
#include "SimpleMath.h"
int main(){
- Vec4f vec(1);
- Quatf quat(vec);
Mat4x4d mat;
+ Quatf quat(1,1,0,1.57);
+ Vec3f vec3;
+ vec3.Elements[0] = 1;
- printf("%f\n",mat[2][1]);
+ Quatf quat2 = quat * vec3 * quat.inverse();
- vec += Vec4f();
- vec /= 2.;
- vec *= 3.;
-
-
- vec = vec - Vec4f(-1);
-
- vec -= Vec4f(2);
- printf("%f %f",vec.Elements[0],vec.Elements[3]);
+ printf("%f %f %f",quat2.Elements[0],quat2.Elements[1],quat2.Elements[2]);
getchar();
return 0;
Oops, something went wrong.

0 comments on commit d08b393

Please sign in to comment.