Skip to content

Commit

Permalink
Added std:: in front of math functions
Browse files Browse the repository at this point in the history
  • Loading branch information
denizdiktas committed Jun 1, 2023
1 parent 7a447d6 commit fc9c993
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2964,7 +2964,7 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ {
auto vn = get_approximate_vector_3(n);

// normalize the vectors
auto normalize = [](auto& x) { x /= sqrt(x.squared_length()); };
auto normalize = [](auto& x) { x /= std::sqrt(x.squared_length()); };
normalize(vs);
normalize(vt);
normalize(vn);
Expand Down Expand Up @@ -2997,18 +2997,18 @@ class Arr_geodesic_arc_on_sphere_traits_2 : public Kernel_ {

// compute the number of divisions given the requested error
const Approximate_number_type R = 1.0; // radius is always 1
Approximate_number_type dtheta = 2.0 * acos(1 - error / R);
int N = ceil(theta / dtheta);
Approximate_number_type dtheta = 2.0 * std::acos(1 - error / R);
int N = std::ceil(theta / dtheta);
dtheta = theta / N;

// generate the points
std::vector<Approximate_vector_3> pts;
pts.reserve(N + 1);
pts.push_back(vs);
for (int i = 1; i < N; i++)
for (int i = 1; i < N; ++i)
{
const Approximate_number_type angle = i * dtheta;
auto p = cos(angle) * axisX + sin(angle) * axisY;
auto p = std::cos(angle) * axisX + std::sin(angle) * axisY;
pts.push_back(p);
}
pts.push_back(vt);
Expand Down

0 comments on commit fc9c993

Please sign in to comment.