This is similar to
Generically, the area2 approach has two benefits:
area2
Square
Rectangle
Quadrilateral