MCPcopy Create free account
hub / github.com/VCVRack/Rack / fromScaled

Method fromScaled

src/Quantity.cpp:197–202  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

195}
196
197float Quantity::fromScaled(float scaledValue) {
198 if (!isBounded())
199 return scaledValue;
200 else
201 return math::rescale(scaledValue, 0.f, 1.f, getMinValue(), getMaxValue());
202}
203
204void Quantity::setScaledValue(float scaledValue) {
205 setValue(fromScaled(scaledValue));

Callers 1

processMethod · 0.80

Calls 1

rescaleFunction · 0.50

Tested by

no test coverage detected