Back to Index

Two-point scaling using the native scale() function without clamping.

Signature

SCALE_2PT(x, x1, x2, y1, y2, &y);

Example

// Example pattern from analog_macros.ems
SCALE_2PT(ain(1), 32, 31850, 0, 10000, mv);