Shoelace formula for polygonal area: Difference between revisions
Shoelace formula for polygonal area (view source)
Revision as of 14:35, 30 September 2020
, 3 years ago→{{header|Python}}: Tidied, restored a missing argument.
(Added Wren) |
(→{{header|Python}}: Tidied, restored a missing argument.) |
||
Line 1,259:
from operator import sub
# --------- SHOELACE FORMULA FOR POLYGONAL AREA ----------
# shoelaceArea :: [(Float, Float)] -> Float
Line 1,274 ⟶ 1,275:
zip(
xys,
islice(cycle(xys), 1, None)
),
(0, 0)
Line 1,280 ⟶ 1,281:
#
# main :: IO()
def main():
|