2017-10-19 6 views
0

私はx = xcos(theta) - ysin(theta)とy = xsin(theta)+ ycos(theta)の回転について理解しています。 (間違った結果)、なぜ私は泣いてしまいます。スケーラを使ってベクトルを丸く回転する

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); 
} 

答えて

0

ただ二重にチェックして、私がコピーしていたコードを貼り付けていましたが、私は誤ってコードオペレーションの間違ったバージョンを見ていました。

関連する問題