Skip to content

Instantly share code, notes, and snippets.

@jarommadsen
jarommadsen / getRotatedRectangle.ts
Created November 3, 2022 19:01
Given 2 points and an angle, find remaining points and width/height
type Point = {x: number; y: number};
type Rect = {
topLeft: Point;
topRight: Point;
bottomLeft: Point;
bottomRight: Point;
width: number;
height: number;
};