Skip to content

Commit c7257ba

Browse files
author
unknown
committed
added missing 'y' calculation in conversion to Cartesian coordinates
1 parent fba3383 commit c7257ba

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

example/mapcode.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ static void convertLatLonToXYZ(double latDeg, double lonDeg, double* x, double*
163163
double latRad = degToRad(latDeg);
164164
double lonRad = degToRad(lonDeg);
165165
*x = cos(latRad) * cos(lonRad);
166+
*y = cos(latRad) * sin(lonRad);
166167
*z = sin(latRad);
167168
}
168169

0 commit comments

Comments
 (0)