MCPcopy Create free account
hub / github.com/OSGeo/PROJ / GetFace

Function GetFace

src/projections/s2.cpp:226–243  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

224}
225
226inline int GetFace(const PJ_XYZ &p) {
227 int face = LargestAbsComponent(p);
228 double pFace;
229 switch (face) {
230 case 0:
231 pFace = p.x;
232 break;
233 case 1:
234 pFace = p.y;
235 break;
236 default:
237 pFace = p.z;
238 break;
239 }
240 if (pFace < 0)
241 face += 3;
242 return face;
243}
244
245inline int XYZtoFaceUV(const PJ_XYZ &p, double *pu, double *pv) {
246 int face = GetFace(p);

Callers 1

XYZtoFaceUVFunction · 0.85

Calls 1

LargestAbsComponentFunction · 0.85

Tested by

no test coverage detected