所以我在 Slick2D 中找到了这个名为 Vecter2f 的类,其中有一个名为 getTheta 的方法。我不知道这是做什么的,但如果有帮助的话,我得到了方法的来源。而这种方法有什么用?
public strictfp double getTheta() {
double theta = StrictMath.toDegrees(StrictMath.atan2(this.y, this.x));
if ((theta < -360.0D) || (theta > 360.0D)) {
theta %= 360.0D;
}
if (theta < 0.0D) {
theta += 360.0D;
}
return theta;
}