From 09a000bf87292a3e01236642243dcd366db14765 Mon Sep 17 00:00:00 2001 From: samreid Date: Tue, 5 Sep 2017 12:48:35 -0600 Subject: [PATCH] Use _.sum, see https://github.com/phetsims/circuit-construction-kit-common/issues/317 --- js/model/Circuit.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/js/model/Circuit.js b/js/model/Circuit.js index ec49d86b..c59f68ef 100644 --- a/js/model/Circuit.js +++ b/js/model/Circuit.js @@ -500,8 +500,7 @@ define( function( require ) { var separation = Math.PI * 2 / neighborCircuitElements.length; var results = []; - //REVIEW: _.sum( angles ) / angles.length - var center = angles.reduce( function( a, b ) { return a + b; }, 0 ) / angles.length; + var center = _.sum( angles ) / angles.length; // Move vertices away from cut vertex so that wires don't overlap if ( neighborCircuitElements.length === 2 ) {