0
Je comprends que pour la rotation x = xcos (thêta) - ysin (thêta) et y = xsin (thêta) + ycos (thêta) donc j'ai écrit le code suivant pour le faire mais il échoue (mauvais résultat) et je carnt fingure pourquoi.rotation du vecteur d'origine à l'aide d'un scaler
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);
}