magpie.coords.rotate2d

magpie.coords.rotate2d(x, y, dphi, center=[0.0, 0.0])

Rotates points in 2D cartesian coordinates counter clockwise by dphi in radians.

Parameters
x, yfloat or array

Cartesian coordinates.

dphifloat

Counter-clockwise rotation.

centerlist[float], optional

Center of rotation, default=[0., 0.].

Returns
xrot, yrotfloat or array

Rotated x and y coordinates.