mirror of
https://github.com/jwetzell/showbridge-docs.git
synced 2026-08-08 15:13:38 +00:00
25 lines
601 B
Plaintext
25 lines
601 B
Plaintext
---
|
|
title: Scale Int
|
|
sidebar:
|
|
label: Scale
|
|
order: 3
|
|
---
|
|
import SchemaInfo from '../../../../components/SchemaInfo.astro';
|
|
|
|
This processor will scale an integer value from one range to another. This processor will return an error if the message being processed is not an integer or if the parameters are not valid (e.g. if `inMin` is greater than or equal to `inMax`, etc.).
|
|
|
|
<SchemaInfo type="processor" id="int.scale"/>
|
|
|
|
### Example
|
|
|
|
Scale an integer value from the range 0-255 to the range 0-100
|
|
|
|
```yaml
|
|
- type: int.scale
|
|
params:
|
|
inMin: 0
|
|
inMax: 255
|
|
outMin: 0
|
|
outMax: 100
|
|
```
|