libpsynth 0.2.1
Functions
static_min, static_max

Equivalents to std::min_element and std::max_element for homogeneous channel bases. More...

Functions

template<typename P >
PSYNTH_FORCEINLINE
element_const_reference_type
< P >::type 
psynth::sound::static_max (const P &p)
template<typename P >
PSYNTH_FORCEINLINE
element_reference_type< P >
::type 
psynth::sound::static_max (P &p)
template<typename P >
PSYNTH_FORCEINLINE
element_const_reference_type
< P >::type 
psynth::sound::static_min (const P &p)
template<typename P >
PSYNTH_FORCEINLINE
element_reference_type< P >
::type 
psynth::sound::static_min (P &p)

Detailed Description

Equivalents to std::min_element and std::max_element for homogeneous channel bases.

Example:

   rgb8_frame_t frame(10,20,30);
   assert(frame[2] == 30);
   static_max(frame) = static_min(frame);
   assert(frame[2] == 10);

Function Documentation

template<typename P >
PSYNTH_FORCEINLINE element_const_reference_type<P>::type psynth::sound::static_max ( const P &  p)
template<typename P >
PSYNTH_FORCEINLINE element_reference_type<P>::type psynth::sound::static_max ( P &  p)
template<typename P >
PSYNTH_FORCEINLINE element_const_reference_type<P>::type psynth::sound::static_min ( const P &  p)
template<typename P >
PSYNTH_FORCEINLINE element_reference_type<P>::type psynth::sound::static_min ( P &  p)