RandFloat: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
 
mNo edit summary
 
(11 intermediate revisions by 7 users not shown)
Line 1: Line 1:
__NOTOC__
__NOTOC__
==Description==
{{Server function}}
This function returns a random float between 0 and 1.
{{Deprecated|math.random}}
 
This function generates a random number between 0 and 1.


==Syntax==
==Syntax==
float randFloat ()
<syntaxhighlight lang="lua">float randFloat ()</syntaxhighlight>


===Required Arguments===
===Returns===
Returns a random number between 0 and 1 in a float.


''None.''
==Example==
This example outputs a random number in the chat box.
<syntaxhighlight lang="lua">outputChatBox ( "Random float: " .. randFloat () )</syntaxhighlight>


==Example==
==See Also==
[[serverChat]] ( "Random float: ", randFloat () )
{{Utility functions}}

Latest revision as of 12:18, 26 June 2014