This commit is contained in:
p57492168 2022-07-04 14:18:28 +08:00
parent 3054fcfd10
commit 4ed115596d
1 changed files with 1 additions and 1 deletions

View File

@ -469,7 +469,7 @@ class SeaEnvEngine(object):
return state, self.terminate, info return state, self.terminate, info
def get_rotated_point(self, x_1, y_1, x_2, y_2, radians): def get_rotated_point(self, x_1, y_1, x_2, y_2, radians):
# Rotate x_2, y_2 around x_1, y_1 by angle. # Rotate x_2, y_2 around x_1, y_1 by angle
x_change = (x_2 - x_1) * math.cos(radians) + \ x_change = (x_2 - x_1) * math.cos(radians) + \
(y_2 - y_1) * math.sin(radians) (y_2 - y_1) * math.sin(radians)
y_change = (y_1 - y_2) * math.cos(radians) - \ y_change = (y_1 - y_2) * math.cos(radians) - \