This article is made by Jason-Cow.
Welcome to reprint.
But please post the article's address.
旋转,跳跃,梦境,之间...
db Ang(db x){return(x*180.0/pi);} db Rad(db x){return(x*pi/180.0);} V Rotate(V A,db a){return V(A.x*cos(a)-A.y*sin(a),A.x*sin(a)+A.y*cos(a));} db Cross(V A,V B){return A.x*B.y-A.y*B.x;} int main(){ cout<<Ang(2*pi)<<endl; D A(3,0),B(0,4); cout<<Cross(A,B)<<endl; cout<<Cross(B,A)<<endl; cout<<"Rad(90)="<<Rad(90)<<endl; cout<<"Ang(Rad(90))="<<Ang(Rad(90))<<endl; cout<<A.x<<" "<<A.y<<endl; A=Rotate(A,Rad(90)); cout<<A.x<<" "<<A.y<<endl; return 0; }