center.js

<script src="./point_src/center.js"></script>

Meta Data
dependencies ()
unused_keys ('title',)
unknown_keys ('files',)
files ['', '# compass.js']
filepath_exists True
path center.js
filepath center.js
clean_files ()

  • VariableDeclaration
    let

    centerOfMass

    =
    ObjectExpression
    Synonymous to: let totalX = 0; let totalY = 0; let numPoints = points.length; for (let i = 0; i < numPoints; i++) { totalX += points[i].x; totalY += points[i].y; } let centerX = totalX / numPoints; let centerY = totalY / numPoints; return point(centerX, centerY);