quaternion test in t.cc

This commit is contained in:
Jiri Pittner 2023-06-30 16:05:33 +02:00
parent ca18446804
commit 85a514a50e

15
t.cc
View File

@ -1237,7 +1237,7 @@ cout <<r;
} }
if(1) if(0)
{ {
int n,m; int n,m;
cin>>n >>m; cin>>n >>m;
@ -1954,6 +1954,19 @@ cin >>v;
cout <<v; cout <<v;
} }
if(1)
{
Quaternion<double> v,r,tmp,q,q1;
cin >>q;
q.normalize();
q1= q;
q1.conjugateme();
cout <<"test "<<q*q1<<endl;
cin >>v;
r= q*v*q1;
cout <<"rotated "<<r<<endl;
}
if(0) if(0)
{ {
Quaternion<double> q(1.); Quaternion<double> q(1.);