anchor.diff:    var centerLongitude = codeArea.center.longitude;
   
     // How many degrees latitude is the code from the reference? If it is more
  -  // than half the resolution, we need to move it east or west.
  -  var degreesDifference = centerLatitude - referenceLatitude;
  -  if (degreesDifference > areaToEdge) {
  -    // If the center of the short code is more than half a cell east,
  -    // then the best match will be one position west.
  +  // than half the resolution, we need to move it north or south but keep it
  +  // within -90 to 90 degrees.
  +  if (referenceLatitude + halfResolution < centerLatitude &&
  +      centerLatitude - resolution >= -LATITUDE_MAX_) {
  +    // If the proposed code is more than half a cell north of the reference location,
  +    // it's too far, and the best match will be one cell south.
       centerLatitude -= resolution;
  -  } else if (degreesDifference < -areaToEdge) {
  -    // If the center of the short code is more than half a cell west,
  -    // then the best match will be one position east.
  +  } else if (referenceLatitude - halfResolution > centerLatitude &&
  +             centerLatitude + resolution <= LATITUDE_MAX_) {
  +    // If the proposed code is more than half a cell south of the reference location,
  +    // it's too far, and the best match will be one cell north.
       centerLatitude += resolution;
     }
   
  
positive.code:   if (degreesDifference > areaToEdge) {
      centerLongitude -= resolution;
    } else if (degreesDifference < -areaToEdge) {
      centerLongitude += resolution;
    }
  
  
negative.code: /// columns than rows.
  int computeLatitudePrecision(int codeLength) {
    if (codeLength <= 10) {
      return pow(encodingBase, (codeLength ~/ -2) + 2);
    }
    return pow(encodingBase, -3) ~/ pow(gridRows, codeLength - 10);
  }
  
  /// Normalize a [longitude] into the range -180 to 180, not including 180.
  