# Issue in math.poly.area function

**URL:** <https://forum.itascainternational.com/t/issue-in-math-poly-area-function/483>\
**Category:** FLAC3D\
**Tags:** fish\
**Created:** [April 27, 2022, 5:43pm UTC](https://forum.itascainternational.com/t/issue-in-math-poly-area-function/483 "2022-04-27T17:43:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![roozbeh](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.itascainternational.com/roozbeh/32/126_2.png) [@roozbeh](https://forum.itascainternational.com/u/roozbeh)\
**Post date:** [April 27, 2022, 5:43pm UTC](https://forum.itascainternational.com/t/issue-in-math-poly-area-function/483/1 "2022-04-27T17:43:12Z")

</div>

Hi,

Trying to use “math.area.poly” function to calculate polygon area but keep getting “Unable to convert parameter type from Map to List” error message. Manual clearly indicates the input type to be Map type but it seems function requires List type.

here is the simple example:

fish define poly\_area  
local m = map(1,(0,0),2,(10,0),3,(10,10),4,(0,10))  
poly\_area = math.area.poly(m)  
end  
[poly\_area]

edited:

the following function is working. I guess the text in the manual need to be updated. instead of Map, List must be used.

fish define poly\_area  
local m = list.seq((0,0),(10,0),(10,10),(0,10),(0,0))  
poly\_area = math.area.poly(m)  
end  
[poly\_area]

-Roozbeh

---

<div class="post-metadata">

**Author:** ![cheng](https://avatars.discourse-cdn.com/v4/letter/c/ecccb3/32.png) [@cheng](https://forum.itascainternational.com/u/cheng)\
**Post date:** [April 27, 2022, 6:15pm UTC](https://forum.itascainternational.com/t/issue-in-math-poly-area-function/483/2 "2022-04-27T18:15:38Z")

</div>

Yes, you are right. The argument should be a LIST.  
We will correct the doc.  
Thanks.
