MCPcopy Create free account
hub / github.com/DISTRHO/Cardinal / MAP

Function MAP

plugins/Cardinal/src/AIDA-X.cpp:32–35  ·  view source on GitHub ↗

Define a macro to re-maps a number from one range to another */

Source from the content-addressed store, hash-verified

30
31/* Define a macro to re-maps a number from one range to another */
32static constexpr float MAP(const float x, const float in_min, const float in_max, const float out_min, const float out_max)
33{
34 return ((x - in_min) * (out_max - out_min) / (in_max - in_min)) + out_min;
35}
36
37/* Defines for tone controls */
38static constexpr const float COMMON_Q = 0.707f;

Callers 2

AidaPluginModuleMethod · 0.85
processMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected