Skip to content

Instantly share code, notes, and snippets.

View Foundsheep's full-sized avatar

djm Foundsheep

View GitHub Profile
@LyleScott
LyleScott / rotate_2d_point.py
Last active March 17, 2025 00:47
Rotate X,Y (2D) coordinates around a point or origin in Python
"""
Lyle Scott, III // lyle@ls3.io
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