Skip to content

Commit

Permalink
chore(at128): change M_PI to M_PIf for clarity
Browse files Browse the repository at this point in the history
Co-authored-by: David Wong <[email protected]>
  • Loading branch information
mojomex and drwnz authored Sep 17, 2024
1 parent f4f8bf1 commit e52d6cb
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ class AngleCorrectorCorrectionBased : public AngleCorrector<HesaiCorrection>
// ////////////////////////////////////////

for (size_t i = 0; i < MAX_AZIMUTH; ++i) {
float rad = 2.f * i * M_PI / MAX_AZIMUTH;
float rad = 2.f * i * M_PIf / MAX_AZIMUTH;
cos_[i] = cosf(rad);
sin_[i] = sinf(rad);
}
Expand Down Expand Up @@ -187,8 +187,8 @@ class AngleCorrectorCorrectionBased : public AngleCorrector<HesaiCorrection>
correction_->getAzimuthAdjustV3(channel_id, block_azimuth) * (AngleUnit / 100);
azimuth = (MAX_AZIMUTH + azimuth) % MAX_AZIMUTH;

float azimuth_rad = 2.f * azimuth * M_PI / MAX_AZIMUTH;
float elevation_rad = 2.f * elevation * M_PI / MAX_AZIMUTH;
float azimuth_rad = 2.f * azimuth * M_PIf / MAX_AZIMUTH;
float elevation_rad = 2.f * elevation * M_PIf / MAX_AZIMUTH;

return {azimuth_rad, elevation_rad, sin_[azimuth],
cos_[azimuth], sin_[elevation], cos_[elevation]};
Expand Down

0 comments on commit e52d6cb

Please sign in to comment.