drop excess copy

This commit is contained in:
jan 2018-04-05 16:07:37 -07:00
commit c0127e16d5

View file

@ -16,7 +16,7 @@ def rotate(poly: poly_t, theta: float, axis: int) -> poly_t:
''' '''
s, c = sin(theta), cos(theta) s, c = sin(theta), cos(theta)
v0 = poly['vertices'][:, axis - 2].copy() v0 = poly['vertices'][:, axis - 2].copy()
v1 = poly['vertices'][:, axis - 1].copy() v1 = poly['vertices'][:, axis - 1]
poly['vertices'][:, axis - 2] = c * v0 - s * v1 poly['vertices'][:, axis - 2] = c * v0 - s * v1
poly['vertices'][:, axis - 1] = s * v1 + c * v0 poly['vertices'][:, axis - 1] = s * v1 + c * v0
return poly return poly