You are viewing a single comment's thread. Return to all comments →
sol :: Fractional a => [[a]] -> a sol ps = (/2) . abs . sum $ zipWith op ps (last ps: ps) where op p q = head p*last q - last p*head q
Seems like cookies are disabled on this browser, please enable them to open this website
Compute the Area of a Polygon
You are viewing a single comment's thread. Return to all comments →