rotate2d

emlib.mathlib.rotate2d(point, degrees, origin=(0, 0))[source]

A rotation function that rotates a point around an origin

Parameters:
  • point (tuple[float, float]) – the point to rotate as a tuple (x, y)

  • degrees (float) – the angle to rotate (counterclockwise)

  • origin – the point acting as pivot to the rotation

Return type:

tuple[float, float]

Returns:

the rotated point, as a tuple (x, y)