(pt, t)
| 1406 | |
| 1407 | |
| 1408 | def affine_transform(pt, t): |
| 1409 | new_pt = np.array([pt[0], pt[1], 1.]).T |
| 1410 | new_pt = np.dot(t, new_pt) |
| 1411 | return new_pt[:2] |
| 1412 | |
| 1413 | def inverse_affine_transform(transformed_pt, t): |
| 1414 | # Extract the 2x2 linear transformation part and the translation part |
no outgoing calls
no test coverage detected