Range-v3
Range algorithms, views, and actions for the Standard Library
ranges::views::linear_distribute_fn Struct Reference

Distributes n values linearly in the closed interval [from, to]. More...

#include <range/v3/view/linear_distribute.hpp>

Public Member Functions

template<typename T >
CPP_TEMPLATE_AUX_0 c (requires std::is_arithmetic< T >::value) ccconstexpr auto operator()(T from
 

Public Attributes

CPP_TEMPLATE_AUX_0 T std::ptrdiff_t n const
 
CPP_TEMPLATE_AUX_0to
 

Related Functions

(Note that these are not member functions.)

constexpr linear_distribute_fn linear_distribute {}
 

Detailed Description

Distributes n values linearly in the closed interval [from, to].

Precondition
from <= to && n > 0

If from == to, returns n-times to. If n == 1 returns to.