signedArea function
dynamic
signedArea(
- dynamic data,
- dynamic start,
- dynamic end,
- dynamic dim,
Implementation
signedArea(data, start, end, dim) {
var sum = 0.0;
for (var i = start, j = end - dim; i < end; i += dim) {
sum += (data[j] - data[i]) * (data[i + 1] + data[j + 1]);
j = i;
}
return sum;
}