1
0
mirror of https://github.com/node-red/node-red-nodes.git synced 2023-10-10 13:36:58 +02:00

Tidy up random node info.

This commit is contained in:
Dave Conway-Jones 2020-12-13 17:38:17 +00:00
parent 9eb031e912
commit 354370e6e0
No known key found for this signature in database
GPG Key ID: 88BA2B8A411BE9FF
2 changed files with 16 additions and 11 deletions

View File

@ -1,14 +1,16 @@
<script type="text/html" data-help-name="random">
<p>Generates a random number between a low and high value. Defaults to 1 to 10.</p>
<p>If left blank <code>from</code> and <code>to</code> can be set dynamically as below.</p>
<h3>Inputs</h3>
<dl class="message-properties">
<dt>from <span class="property-type">number</span></dt>
<dd>containing the low value to be used.</dd>
<dt>to <span class="property-type">number</span></dt>
<dd>containing the high value to be used.</dd>
</dl>
<h3>Details</h3>
<p>If set to return an integer it can <i>include</i> both the low and high values.
<code>min <= n <= max</code></p>
<code>min <= n <= max</code></p>
<p>If set to return a floating point value it will be from the low value, up to, but
not including the high value. <code>min <= n < max</code></p>
<p><b>Inputs</b></p>
<p>You can dynamically pass in the 'From' and 'To' values to the node. <b>NOTE:</b> hard coded values in the node <b>always take precedence.</b>
<ul>
<i><b>From</b> [msg.from] Number containing the low value to be used.</i>
<br>
<i><b>To</b> [msg.to] Number containing the high value to be used.</i>
</ul>
not including the high value. <code>min <= n < max</code></p>
</script>

View File

@ -1,6 +1,6 @@
{
"name" : "node-red-node-random",
"version" : "0.2.0",
"version" : "0.3.0",
"description" : "A Node-RED node that when triggered generates a random number between two values.",
"dependencies" : {
},
@ -19,5 +19,8 @@
"name": "Dave Conway-Jones",
"email": "ceejay@vnet.ibm.com",
"url": "http://nodered.org"
}
},
"contributors": [
{"name": "@zenofmud"}
]
}