You could use `window.Game.Utils.getDistance`.