Map Range
Rescale a value from one range to another, linearly, on a log scale or a square root.
Syntax
{ "id": "n1", "op": "map-range", "name": "map-range", "x": 0, "y": 0, "params": {} }
An edge into it ends at "targetPort": "in"; one out of it starts at "sourcePort": "out"; a parameter is set in params (leave out the ones at their default), driven by an edge to par:inMin, or read elsewhere as ch('map-range/inMin').
Inputs
| Port | Type | Takes |
|---|---|---|
in | table | one edge |
Parameters
| Parameter | Kind | Default | Choices |
|---|---|---|---|
input | expr | "value" | |
name | string | "pscale" | |
kind | menu | "linear" | linear, log, sqrt |
inMin | float | 0 | |
inMax | float | 1 | |
outMin | float | 0 | |
outMax | float | 1 | |
clamp | toggle | true |
Outputs
| Port | Type |
|---|---|
out | table |
Details
- Category: Rows
- Operator:
map-range
Older projects
Projects saved before documents used operator classes. These convert to map-range when they open: MapRangeOp.