Skip to content

Instantly share code, notes, and snippets.

View Foundsheep's full-sized avatar

djm Foundsheep

  • Seoul
  • 20:02 (UTC +09:00)
View GitHub Profile
@LyleScott
LyleScott / rotate_2d_point.py
Last active October 7, 2024 08:05
Rotate X,Y (2D) coordinates around a point or origin in Python
"""
Lyle Scott, III // [email protected]
Multiple ways to rotate a 2D point around the origin / a point.
Timer benchmark results @ https://gist.github.com/LyleScott/d17e9d314fbe6fc29767d8c5c029c362
"""
from __future__ import print_function
import math