mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-07-24 19:52:07 +08:00
31 lines
1.8 KiB
HTML
31 lines
1.8 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>RAND Function</title>
|
|
<meta charset="utf-8" />
|
|
<meta name="description" content="" />
|
|
<link type="text/css" rel="stylesheet" href="../../../../../../common/main/resources/help/editor.css" />
|
|
<link type = "text/css" rel = "stylesheet" href = "../../images/sprite.css" />
|
|
<script type="text/javascript" src="../callback.js"></script>
|
|
<script type="text/javascript" src="../../../../../../common/main/resources/help/search/js/page-search.js"></script>
|
|
</head>
|
|
<body>
|
|
<div class="mainpart">
|
|
<div class="search-field">
|
|
<input id="search" class="searchBar" placeholder="Search" type="text" onkeypress="doSearch(event)">
|
|
</div>
|
|
<h1>RAND Function</h1>
|
|
<p>The <b>RAND</b> function is one of the <a href="../UsageInstructions/InsertFunction.htm#mathtrigonometry" onclick="onhyperlinkclick(this)">math and trigonometry functions</a>. The function returns a random number greater than or equal to <b>0</b> and less than <b>1</b>. It does <b>not</b> require any argument.</p>
|
|
<h3>Syntax</h3>
|
|
<p><b><em>RAND()</em></b></p>
|
|
<h3>Notes</h3>
|
|
<p><a href="../UsageInstructions/InsertFunction.htm#applyfunction" onclick="onhyperlinkclick(this)">How to apply</a> the <b>RAND</b> function.</p>
|
|
|
|
<h3>Examples</h3>
|
|
<p>The figure below displays the result returned by the <b>RAND</b> function.</p>
|
|
<p><img alt="RAND Function" src="../images/rand.png" /></p>
|
|
<p>To generate a random real number between <b><em>a</em></b> and <b><em>b</em></b>, use the following formula replacing <b><em>a</em></b> and <b><em>b</em></b> with your own values: <em><b>=RAND()*(b-a)+a</b></em></p>
|
|
<p><img alt="RAND Function" src="../images/rand2.png" /></p>
|
|
</div>
|
|
</body>
|
|
</html> |