แก้ coding style ภาค 4
This commit is contained in:
@@ -9,7 +9,8 @@ export function getStress (nodes, distance) {
|
||||
let sumLowDDistSq = 0;
|
||||
for (let j = nodes.length - 1; j >= 1; j--) {
|
||||
for (let i = 0; i < j; i++) {
|
||||
let source = nodes[i], target = nodes[j];
|
||||
let source = nodes[i];
|
||||
let target = nodes[j];
|
||||
let lowDDist = Math.hypot(target.x - source.x, target.y - source.y);
|
||||
let highDDist = distance(source, target);
|
||||
sumDiffSq += Math.pow(highDDist - lowDDist, 2);
|
||||
|
||||
Reference in New Issue
Block a user