L3DT users' wiki
Large 3D terrain generator

absrand

Description

Get a floating point random number, in the range of 0…1.

Function prototype

float absrand <void>

Arguments

None.

Return value

A floating-point random number, in the range of 0…1.

Example

// write random number to event log 10 times
int i
set i 0
do
  echo <zs:absrand>
  incr i
while <zs:islt i 10>

… the output of which is written to the event log by echo as:

0.875973
0.726676
0.955901
0.925718
0.539354
0.142338
0.462081
0.235328
0.862239
0.209601

Comments

None.

See also

 
plugins/general/zeoscript/reference/functions/absrand.txt · Last modified: 2017/08/31 06:18 (external edit)
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki