0
我知道对于旋转x = xcos(theta) - ysin(theta)和y = xsin(theta)+ ycos(theta)所以我写了folling代码来做到这一点, (错误的结果),我掏出了为什么。使用缩放器旋转圆形原点
rotate(pScaler) {
this.xResult = (this.getX() * Math.cos(this.pScaler)) - (this.getY() * Math.sin(this.pScaler));
this.yResult = (this.getX() * Math.sin(this.pScaler)) + (this.getY() * Math.cos(this.pScaler));
return new Vector(this.xResult, this.yResult, 0);
}