fixed largestRect to handle less than 3 coordinates

largestRect function return nulls when passed less than 3 coordinates