mirror of
https://github.com/google/blockly.git
synced 2026-01-20 15:27:09 +01:00
Migrate core/utils/coordinate.js to ES6 const/let
This commit is contained in:
@@ -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);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user