Minor code clean-up.

This commit is contained in:
Jürg Lehni 2015-10-05 17:35:54 +02:00
parent 1f03b00f99
commit aa3f527ca6

View file

@ -365,8 +365,7 @@
for (var i = 0, len = children && children.length; i < len; i++) {
var cCenter = children[i].bounds.center;
var vec = cCenter.subtract(center);
vec = (vec.isClose([0,0], 0.5))? vec : vec.normalize(distance);
children[i].translate(vec);
children[i].translate(vec.length < 0.5 ? vec : vec.normalize(distance));
}
}