MCPcopy Create free account
hub / github.com/geekcomputers/Python / rotation

Function rotation

linear-algebra-python/src/Transformations2D.py:12–21  ·  view source on GitHub ↗
(angle)

Source from the content-addressed store, hash-verified

10
11
12def rotation(angle):
13 arr = np.empty([2, 2])
14 c = np.cos(angle)
15 s = np.sin(angle)
16 arr[0][0] = c
17 arr[0][1] = -s
18 arr[1][0] = s
19 arr[1][1] = c
20
21 return arr # This returns a rotation matrix
22
23
24def projection(angle):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected