{"size": 454, "ext": "js", "max_stars_repo_path": "js/utils.js", "max_stars_repo_name": "lorossi/random-ellsworth-kelly", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "js/utils.js", "max_issues_repo_name": "lorossi/random-ellsworth-kelly", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "js/utils.js", "max_forks_repo_name": "lorossi/random-ellsworth-kelly", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 28.375, "max_line_length": 81, "alphanum_fraction": 0.5286343612}
const dist_sq = (x1, y1, x2, y2) => {
  return Math.pow(x1 - x2, 2) + Math.pow(y1 - y2, 2);
};

const dist = (x1, y1, x2, y2) => {
  return Math.sqrt(dist_sq(x1, y1, x2, y2));
};

const ease = (x) => Math.pow(x, 1.5);

const random = (a, b) => {
  if (a == undefined && b == undefined) return random(0, 1);
  else if (b == undefined) return random(0, a);
  else if (a != undefined && b != undefined) return Math.random() * (b - a) + a;
};
