Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
34
def
dot(u, v):
35
return
sum(u[i]*v[i]
for
i in range(0,3))
36
def
normalize(v):
37
vmag = magnitude(v)
38
return
[ v[i]/vmag
for
i in range(0,3) ]
39
40
# Variables local to this module
41
left = 0
Callers
1
mouseMiddleMove
Function · 0.70
Calls
2
magnitude
Function · 0.85
range
Class · 0.50
Tested by
no test coverage detected