comparison pytouhou/vm/eclrunner.py @ 147:a61c96265779

Fix a crash with ECL instruction 25
author Thibaut Girka <thib@sitedethib.com>
date Tue, 04 Oct 2011 17:52:12 +0200
parents cadfc5e5ad7a
children 4f46717390aa
comparison
equal deleted inserted replaced
146:96c30ffd9b87 147:a61c96265779
339 339
340 340
341 @instruction(25) 341 @instruction(25)
342 def get_direction(self, variable_id, x1, y1, x2, y2): 342 def get_direction(self, variable_id, x1, y1, x2, y2):
343 #TODO: takes only floats. 343 #TODO: takes only floats.
344 self._setval(variable_id, math.atan2(self._getval(y2) - self._getval(y1), self._getval(x2) - self._getval(x1))) 344 self._setval(variable_id, atan2(self._getval(y2) - self._getval(y1), self._getval(x2) - self._getval(x1)))
345 345
346 346
347 @instruction(27) 347 @instruction(27)
348 @instruction(28) 348 @instruction(28)
349 def compare(self, a, b): 349 def compare(self, a, b):