RandFloat: Difference between revisions

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



Revision as of 21:30, 20 April 2011


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.


Please use math.random(1)

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

Shared