Issue in math.poly.area function

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

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