MCPcopy Create free account
hub / github.com/Kitware/VTK / normalize

Function normalize

Interaction/Style/Testing/Python/TestStyleUser.py:36–38  ·  view source on GitHub ↗
(v)

Source from the content-addressed store, hash-verified

34def dot(u, v):
35 return sum(u[i]*v[i] for i in range(0,3))
36def normalize(v):
37 vmag = magnitude(v)
38 return [ v[i]/vmag for i in range(0,3) ]
39
40# Variables local to this module
41left = 0

Callers 1

mouseMiddleMoveFunction · 0.70

Calls 2

magnitudeFunction · 0.85
rangeClass · 0.50

Tested by

no test coverage detected