MCPcopy Create free account
hub / github.com/Robbyant/lingbot-map / _normalize

Function _normalize

demo_render/interactive_viewer/camera.py:12–14  ·  view source on GitHub ↗
(v: np.ndarray)

Source from the content-addressed store, hash-verified

10
11
12def _normalize(v: np.ndarray) -> np.ndarray:
13 n = np.linalg.norm(v)
14 return v / n if n > 1e-8 else v
15
16
17def _lookat_w2c(eye: np.ndarray, center: np.ndarray, up: np.ndarray) -> np.ndarray:

Callers 6

_lookat_w2cFunction · 0.85
forwardMethod · 0.85
rightMethod · 0.85
camera_upMethod · 0.85
orbitMethod · 0.85
interpolateMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected