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

Method normalize

recipes/Python/578006_vector/recipe-578006.py:402–406  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

400 return Vector2(x / temp, y / temp)
401
402 def normalize(self):
403 x, y = self.x, self.y
404 temp = hypot(x, y)
405 self.x, self.y = x / temp, y / temp
406 return self
407
408 # Vector Multiplication Operations
409

Callers 6

engFunction · 0.45
_slugifyFunction · 0.45
run_AIMethod · 0.45
getProjectionMatMethod · 0.45
remove_accentsFunction · 0.45
engFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected