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

Method normalize

recipes/Python/576908_Python_Vectors/recipe-576908.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 2

remove_diacriticFunction · 0.45
recipe-576857.pyFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected