Thursday, 1 October 2015

Rotated rectangle's bounding box

We have a rectangle shape, we know it's height and width. We want to rotate it by some degrees and find out it's bounding box's width and height. Here's how I did it in Ruby: