March 2017
Intermediate to advanced
480 pages
11h 3m
English
A rectangle has four sides; the angle between each side is 90 degrees. There are several ways to represent a rectangle: using a Min and Max point, using a Center and half-extents, or using a Position and a Size:

We are going to implement our rectangle structure using the origin and Size representation. However, having the Min and Max representation of a rectangle is often useful. For this reason, we are going to implement helper functions to get the Min and Max points of a rectangle, and we will to make a rectangle from a Min and Max pair.
Follow these steps to implement a two-dimensional rectangle and all of the ...
Read now
Unlock full access