Skip to content

Commit

Permalink
Multiple by itself instead of std::pow
Browse files Browse the repository at this point in the history
Co-authored-by: Even Rouault <[email protected]>
  • Loading branch information
Ryanf55 and rouault authored Mar 20, 2024
1 parent d25924b commit 2652cc5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion alg/los.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ bool GDALIsLineOfSightVisible(const GDALRasterBandH hBand, const int xA,
// Use an interpolated Z height with 2D bresenham for the remaining cases.

// Lambda for computing the square of a number
auto SQUARE = [](const int n) -> int { return std::pow(n, 2); };
auto SQUARE = [](const int n) -> int { return n * n ; };

// Lambda for Linear interpolate like C++20 std::lerp.
auto lerp = [](const double a, const double b, const double t)
Expand Down

0 comments on commit 2652cc5

Please sign in to comment.