Skip to content

Commit

Permalink
refactor: use std::atan2 instead of atan2f (#3695)
Browse files Browse the repository at this point in the history
  • Loading branch information
CarloVarni authored Oct 6, 2024
1 parent 238639b commit c96fe38
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions Core/include/Acts/EventData/SpacePointContainer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
#include <any>
#include <vector>

#include <math.h>

namespace Acts {

struct SpacePointContainerConfig {
Expand Down
4 changes: 2 additions & 2 deletions Core/include/Acts/EventData/SpacePointContainer.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

#include <math.h>
#include <cmath>

namespace Acts {

Expand Down Expand Up @@ -44,7 +44,7 @@ void SpacePointContainer<container_t, holder_t>::initialize() {
m_data.setZ(i, external_container.z_impl(i));
m_data.setRadius(
i, std::sqrt(m_data.x(i) * m_data.x(i) + m_data.y(i) * m_data.y(i)));
m_data.setPhi(i, atan2f(m_data.y(i), m_data.x(i)));
m_data.setPhi(i, std::atan2(m_data.y(i), m_data.x(i)));
m_data.setVarianceR(i, external_container.varianceR_impl(i));
m_data.setVarianceZ(i, external_container.varianceZ_impl(i));

Expand Down

0 comments on commit c96fe38

Please sign in to comment.