private static S2CellId fromFaceIJWrap(int face,int i,int j){
  i=Math.max(-1,Math.min(MAX_SIZE,i));
  j=Math.max(-1,Math.min(MAX_SIZE,j));
  final double kScale=1.0 / MAX_SIZE;
  double s=kScale * ((i << 1) + 1 - MAX_SIZE);
  double t=kScale * ((j << 1) + 1 - MAX_SIZE);
  S2Point p=S2Projections.faceUvToXyz(face,s,t);
  face=S2Projections.xyzToFace(p);
  R2Vector st=S2Projections.validFaceXyzToUv(face,p);
  return fromFaceIJ(face,stToIJ(st.x()),stToIJ(st.y()));
}

private static S2CellId fromFaceIJWrap ( int face , int i , int j ) { i = Math . max ( - 1 , Math . min ( MAX_SIZE , i ) ) ; j = Math . max ( - 1 , Math . min ( MAX_SIZE , j ) ) ; final double kScale = 1.0 / MAX_SIZE ; double s = kScale * ( ( i << 1 ) + 1 - MAX_SIZE ) ; double t = kScale * ( ( j << 1 ) + 1 - MAX_SIZE ) ; S2Point p = S2Projections . faceUvToXyz ( face , s , t ) ; face = S2Projections . xyzToFace ( p ) ; R2Vector st = S2Projections . validFaceXyzToUv ( face , p ) ; return fromFaceIJ ( face , stToIJ ( st . x ( ) ) , stToIJ ( st . y ( ) ) ) ; }
given ( i , j ) coordinates that may be out of bounds , normalize them by returning the corresponding neighbor cell on an adjacent face .
