According to David Barrys work at http://pappubahry.com/misc/rectangles/
"The rectangularness of these countries is defined as its maximum percentage overlap with a rectangle of the same area, working in the equirectangular projection (i.e., x = longitude, y = latitude)."
The index goes between 0 and 1 where 1 is a perfect rectangle and "0 would be achieved in a limit of an infinite number of infinitely small islands"