2020-01-28 05:39:41 +01:00
|
|
|
|
<!--
|
|
|
|
|
Copyright JS Foundation and other contributors, http://js.foundation
|
|
|
|
|
|
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
|
you may not use this file except in compliance with the License.
|
|
|
|
|
You may obtain a copy of the License at
|
|
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
|
limitations under the License.
|
|
|
|
|
-->
|
|
|
|
|
|
2023-07-10 14:22:11 +02:00
|
|
|
|
<script type="text/html" data-help-name="range">
|
2020-01-28 05:39:41 +01:00
|
|
|
|
<p>将数值映射为另一个区间的数值</p>
|
|
|
|
|
<h3>输入</h3>
|
|
|
|
|
<dl class="message-properties">
|
|
|
|
|
<dt>payload<span class="property-type">数值</span></dt>
|
2020-01-29 11:21:50 +01:00
|
|
|
|
<dd>有效荷载<i>一定</i>得是一个数值. 否则则会映射失败。</dd>
|
2020-01-28 05:39:41 +01:00
|
|
|
|
</dl>
|
|
|
|
|
<h3>输出</h3>
|
|
|
|
|
<dl class="message-properties">
|
|
|
|
|
<dt>payload<span class="property-type">数值</span></dt>
|
|
|
|
|
<dd>被映射到新区间的数值。</dd>
|
|
|
|
|
</dl>
|
|
|
|
|
<h3>详细</h3>
|
|
|
|
|
<p>该节点将线性缩放所接收到的数值。在默认情况下,结果不限于节点中定义的范围。</p>
|
|
|
|
|
<p><i>缩放并限制到目标范围</i>表示结果永远不会超出目标范围内指定的范围。</p>
|
|
|
|
|
<p><i>在目标范围内缩放并折叠</i>表示结果将会被限制(折叠)在目标范围内。</p>
|
|
|
|
|
<p>例如,输入0-10映射到0-100。</p>
|
|
|
|
|
<table style="outline-width:#888 solid thin">
|
|
|
|
|
<tr><th width="80px">模式</th><th width="80px">输入</th><th width="80px">输出</th></tr>
|
|
|
|
|
<tr><td><center>scale</center></td><td><center>12</center></td><td><center>120</center></td></tr>
|
|
|
|
|
<tr><td><center>limit</center></td><td><center>12</center></td><td><center>100</center></td></tr>
|
|
|
|
|
<tr><td><center>wrap</center></td><td><center>12</center></td><td><center>20</center></td></tr>
|
|
|
|
|
</table>
|
|
|
|
|
</script>
|