Skip to content

Inverse Linear Mapping

What It Does

Maps a value from one numeric range to another, similar to range mapping. It takes a value within a source range and finds the equivalent value in a target range, maintaining the same relative position.

Inputs

NameDescriptionTypeRequired
valueThe value to transformNumberNo
inMinThe minimum of the source rangeNumberNo
inMaxThe maximum of the source rangeNumberNo
outMinThe minimum of the target rangeNumberNo
outMaxThe maximum of the target rangeNumberNo
clampWhether to restrict the result to the output rangeYes/NoNo
precisionNumber of decimal places to round toNumberNo

Outputs

NameDescriptionType
valueThe transformed value in the new rangeNumber

Inverse Linear Mapping Example

How to Use It

  1. Drag the Inverse Linear Mapping node into your graph.
  2. Set "value" to the number you want to transform (e.g., 0.5).
  3. Define your source range with "inMin" (e.g., 0) and "inMax" (e.g., 1).
  4. Define your target range with "outMin" (e.g., 0) and "outMax" (e.g., 100).
  5. Choose whether to clamp the result to the output range.
  6. Set the "precision" for decimal rounding (default is 2).
  7. Run the graph—with the example values, your output will be 50.

Tips

  • Ensure inMin and inMax are different values to avoid division by zero.
  • The output range can be reversed (e.g., outMin=100, outMax=0) to invert the mapping.
  • When clamp is enabled, the output will never exceed the output range boundaries.

See Also

  • Range Mapping: A similar node in the Math category with the same functionality.
  • Lerp: For linear interpolation between two values.
  • Clamp: For restricting a value within a specific range.

Use Cases

  • Responsive Design: Map screen dimensions to appropriate element sizes.
  • Data Visualization: Convert raw data values to pixel coordinates for display.
  • Animation Control: Transform timing values into position, opacity, or scale values.
  • Normalization: Convert values from different scales into a common range (often 0-1).