|
Boost : |
From: Mateusz Loskot (mateusz_at_[hidden])
Date: 2019-05-28 08:29:22
On Tue, 28 May 2019 at 01:21, Stefan Seefeld <stefan_at_[hidden]> wrote:
> On 2019-05-28 1:05 a.m., Olzhas Zhumabek wrote:
> > I implemented the Lanczos algorithm in a very rough form. Here is the link
> > to the file: link
> > <https://github.com/simmplecoder/gil/blob/lanczos/test/image_processing/lanczos_scaling.cpp>
> > .
> > It needs a dependency on constants, as 3.14 might be too inaccurate with
> > images of much bigger resolution. Can we bring in boost.constants (not
> > sure about exact name)?
>
> In theory, I'm not opposed to the idea. (I believe the right spelling
> would be
>
> |constdoublepi =boost::math::constants::pi<double>();|
>
> But if all we need is the value of pi, I think we can simply clone the
> definition (either from `Boost.Constants`, or by just using the
> pre-defined `M_PI` macro directly.
I agree.
I'd add a new header boost/gil/detail/math.hpp, in
namespace boost { namespace gil { namespace detail { ... }}}
By the way, Boost.Geometry depends on Boost.Math for PI-s and others
https://github.com/boostorg/geometry/blob/develop/include/boost/geometry/util/math.hpp#L408-L440
Just keep in mind BG is C++03 library, so you won't see use of constexpr.
Best regards,
-- Mateusz Loskot, http://mateusz.loskot.net
Boost list run by Boost-Gil-Owners