function shoelace(edges) {

			var area = 0;

			var _iteratorNormalCompletion = true;
			var _didIteratorError = false;
			var _iteratorError = undefined;

			try {
				for (var _iterator = edges[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
					var _step$value = _slicedToArray(_step.value, 2);

					var u = _step$value[0];
					var v = _step$value[1];
					area += vcross2(u, v);
				}
			} catch (err) {
				_didIteratorError = true;
				_iteratorError = err;
			} finally {
				try {
					if (!_iteratorNormalCompletion && _iterator["return"]) {
						_iterator["return"]();
					}
				} finally {
					if (_didIteratorError) {
						throw _iteratorError;
					}
				}
			}

			return Math.abs(area) / 2;
		}
function shoelace(edges) {

			var area = 0;

			var _iteratorNormalCompletion = true;
			var _didIteratorError = false;
			var _iteratorError = undefined;

			try {
				for (var _iterator = edges[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
					var _step$value = _slicedToArray(_step.value, 2);

					var u = _step$value[0];
					var v = _step$value[1];
					area += vcross2(u, v);
				}
			} catch (err) {
				_didIteratorError = true;
				_iteratorError = err;
			} finally {
				try {
					if (!_iteratorNormalCompletion && _iterator["return"]) {
						_iterator["return"]();
					}
				} finally {
					if (_didIteratorError) {
						throw _iteratorError;
					}
				}
			}

			return Math.abs(area) / 2;
		}
function shoelace ( edges ) { var area = 0 ; var _iteratorNormalCompletion = true ; var _didIteratorError = false ; var _iteratorError = undefined ; try { for ( var _iterator = edges [ Symbol . iterator ] ( ) , _step ; ! ( _iteratorNormalCompletion = ( _step = _iterator . next ( ) ) . done ) ; _iteratorNormalCompletion = true ) { var _step$value = _slicedToArray ( _step . value , 2 ) ; var u = _step$value [ 0 ] ; var v = _step$value [ 1 ] ; area += vcross2 ( u , v ) ; } } catch ( err ) { _didIteratorError = true ; _iteratorError = err ; } finally { try { if ( ! _iteratorNormalCompletion && _iterator [ "return" ] ) { _iterator [ "return" ] ( ) ; } } finally { if ( _didIteratorError ) { throw _iteratorError ; } } } return Math . abs ( area ) / 2 ; }
/* js/src/d2 /* js/src/d2/area /* js/src/d2/area/shoelace.js
/ * js / src / d2 / * js / src / d2 / area / * js / src / d2 / area / shoelace . js