MCPcopy Create free account
hub / github.com/LabSound/LabSound / blep

Function blep

src/extended/PolyBLEPNode.cpp:35–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33inline T square(const T & x) { return x * x; }
34
35inline double blep(const double t, const double dt)
36{
37 if (t < dt) return -square(t / dt - 1);
38 else if (t > 1 - dt) return square((t - 1) / dt + 1);
39 else return 0.0;
40}
41
42inline double blamp(double t, const double dt)
43{

Callers 5

sqrMethod · 0.85
sqr2Method · 0.85
rectMethod · 0.85
sawMethod · 0.85
rampMethod · 0.85

Calls 1

squareFunction · 0.85

Tested by

no test coverage detected