function pointDistance(a, b) {
  if (!a || !b) {
    return -1;
  }

  return Math.sqrt(
    Math.pow(a.x - b.x, 2) +
    Math.pow(a.y - b.y, 2)
  );
}
Computes the distance between two points.

@param {Point} a
@param {Point} b

@return {number} The distance between the two points.