Migrate core/utils/coordinate.js to ES6 const/let

This commit is contained in:
kozbial
2021-07-13 15:56:05 -07:00
committed by Monica Kozbial
parent 81658d78ce
commit fb7bba3491

View File

@@ -63,8 +63,8 @@ Blockly.utils.Coordinate.equals = function(a, b) {
* @return {number} The distance between `a` and `b`.
*/
Blockly.utils.Coordinate.distance = function(a, b) {
var dx = a.x - b.x;
var dy = a.y - b.y;
const dx = a.x - b.x;
const dy = a.y - b.y;
return Math.sqrt(dx * dx + dy * dy);
};