ˆêŽŸ•ÏŠ·
class Rotation
{
double theta;
double x,y;
double rad=Math.PI/180;
Rotation()
{
theta=45;
x=100;
y=50;
}
void set(double x,double y,double theta)
{
this.theta=theta;
this.x=x;
this.y=y;
}
double getx(double x,double y)
{
return Math.cos(rad*theta)*x-Math.sin(rad*theta)*y;
}
double gety(double x,double y)
{
return Math.sin(rad*theta)*x+Math.cos(rad*theta)*y;
}
}