Skip to content

Commit

Permalink
[WSCoordinateAnalysis] Update comments to match code
Browse files Browse the repository at this point in the history
Update comments for Accelerate calls to use updated variable names
  • Loading branch information
leptos-null committed Dec 16, 2021
1 parent c948b20 commit f322828
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions WorkoutSpot/Models/DataProcessing/WSCoordinateAnalysis.m
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,12 @@ - (WSDataAnalysis *)stepSpace {
double *latSinSq = malloc(length * sizeof(double));
double *latCosSq = malloc(length * sizeof(double));

vDSP_vsqD(latSin, 1, latSinSq, 1, length); // geoSinBuild = latSin**2
vDSP_vsqD(latCos, 1, latCosSq, 1, length); // geoCosBuild = latCos**2
vDSP_vsqD(latSin, 1, latSinSq, 1, length); // latSinSq = latSin**2
vDSP_vsqD(latCos, 1, latCosSq, 1, length); // latCosSq = latCos**2

// spheroidRadii = alphaFourth*geoCosBuild + betaFourth*geoSinBuild
// spheroidRadii = alphaFourth*latCosSq + betaFourth*latSinSq
vDSP_vsmsmaD(latCosSq, 1, &alphaFourth, latSinSq, 1, &betaFourth, spheroidRadii, 1, length);
// geoSquaredSum = alphaSquared*geoCosBuild + betaSquared*geoSinBuild
// geoSquaredSum = alphaSquared*latCosSq + betaSquared*latSinSq
vDSP_vsmsmaD(latCosSq, 1, &alphaSquared, latSinSq, 1, &betaSquared, geoSquaredSum, 1, length);

vvdiv(spheroidRadii, spheroidRadii, geoSquaredSum, &len); // spheroidRadii /= geoSquaredSum
Expand Down

0 comments on commit f322828

Please sign in to comment.