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

Function gaussian

include/LabSound/core/WindowFunctions.h:88–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86 }
87
88 inline float gaussian(const float max_index, const uint32_t idx, const float sigma)
89 {
90 const float fract = (idx - (max_index * 0.5f)) / (sigma * (max_index * 0.5f));
91 return std::exp(-0.5f * (fract * fract));
92 }
93}
94
95// Reference https://github.com/spurious/snd-mirror/blob/master/clm.c

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected