forked from SeAIPalette/SeAIPalette
This commit is contained in:
parent
3054fcfd10
commit
4ed115596d
|
@ -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) - \
|
||||||
|
|
Loading…
Reference in New Issue