MCPcopy Create free account
hub / github.com/ActiveState/code / rotate

Method rotate

recipes/Python/578006_vector/recipe-578006.py:435–437  ·  view source on GitHub ↗
(self, vec)

Source from the content-addressed store, hash-verified

433 return Vector2(x * temp, y * temp)
434
435 def rotate(self, vec):
436 x1, y1, x2, y2 = self.x, self.y, vec.x, vec.y
437 return Vector2(x1 * x2 + y1 * y2, y1 * x2 - x1 * y2)
438
439 def interpolate(self, vec, bias):
440 a = 1 - bias

Callers 9

snakeFunction · 0.45
write_textFunction · 0.45
renderMethod · 0.45
txt2imgFunction · 0.45
_animate_generatorMethod · 0.45
drawPointerMethod · 0.45
paintEventMethod · 0.45
iterationMethod · 0.45
recipe-303529.pyFile · 0.45

Calls 1

Vector2Class · 0.70

Tested by

no test coverage detected