MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ stretched_series()

MAYAFLUX_API std::vector< double > MayaFlux::Kinesis::Discrete::stretched_series ( size_t  count,
double  stretch,
double  base = 1.0 
)

Integers pulled outward with order: base * n * sqrt(1 + stretch * n^2).

Parameters
countNumber of terms, n running from 1
stretchZero gives the harmonic series; positive values spread the upper terms
baseValue of the first term when stretch is zero

Definition at line 32 of file Series.cpp.

33{
34 std::vector<double> terms(count);
35 for (size_t i = 0; i < count; ++i) {
36 const auto n = static_cast<double>(i + 1);
37 terms[i] = base * n * std::sqrt(1.0 + stretch * n * n);
38 }
39 return terms;
40}
size_t count

References count.