diff -r 000000000000 -r 3547b885df7e tests/vector.cc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/vector.cc Thu Oct 25 16:40:22 2007 +0200 @@ -0,0 +1,23 @@ +#include "vector.h" + +int main() { + Vector3 a(1, 2, 3); + cout << "=== Vector3 test ===" << endl; + cout << "a = " << a << endl; + Vector3 b(2, 3, 2); + cout << "b = " << b << endl; + + cout << "a + b = " << a + b << endl; + cout << "b - a = " << b - a << endl; + cout << "dot(a,b) = " << dot(a,b) << endl; + cout << "cross(a,b) = " << cross(a,b) << endl; + cout << "a * 2 = " << a * 2 << endl; + cout << "3 * b = " << 3 * b << endl; + cout << "-a = " << -a << endl; + + cout << "a.mag() = " << a.mag() << endl; + cout << "a.unit() = " << a.unit() << endl; + cout << "a.unit().mag() = " << a.unit().mag() << endl; + + return 0; +}