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

Function reflection

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

Source from the content-addressed store, hash-verified

34
35
36def reflection(angle):
37 arr = np.empty([2, 2])
38 c = np.cos(angle)
39 s = np.sin(angle)
40 arr[0][0] = (2 * c) - 1
41 arr[0][1] = 2 * s * c
42 arr[1][0] = 2 * s * c
43 arr[1][1] = (2 * s) - 1
44
45 return arr # This returns a reflection matrix

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected