00001 #include <TooN/helpers.h> 00002 00003 using namespace std; 00004 using namespace TooN; 00005 00006 int main() 00007 { 00008 { 00009 Vector<4> v; 00010 00011 v = makeVector(1,1,1,1); 00012 normalize(v); 00013 cout << v << endl; 00014 00015 v = makeVector(1,1,1,1); 00016 normalize(v.slice<0,2>()); 00017 cout << v << endl; 00018 00019 v = makeVector(1,1,1,1); 00020 normalize(v.slice(0,3)); 00021 cout << v << endl; 00022 } 00023 00024 { 00025 Vector<> v = makeVector(1,1,1,1); 00026 00027 normalize(v); 00028 cout << v << endl; 00029 00030 v = makeVector(1,1,1,1); 00031 normalize(v.slice<0,2>()); 00032 cout << v << endl; 00033 00034 v = makeVector(1,1,1,1); 00035 normalize(v.slice(0,3)); 00036 cout << v << endl; 00037 } 00038 }