RandFloat: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
{{Server function}}
{{Server function}}
__NOTOC__
__NOTOC__
{{Deprecated}}
This function generates a random number between 0 and 1.
This function generates a random number between 0 and 1.



Revision as of 14:24, 20 January 2009


Emblem-important.png This function is deprecated. This means that its use is discouraged and that it might not exist in future versions, but there should be a more generic way to perform what it does.

This function generates a random number between 0 and 1.

Syntax

float randFloat ()

Returns

Returns a random number between 0 and 1 in a float.

Example

This example outputs a random number in the chat box.

outputChatBox ( "Random float: " .. randFloat () )

See Also