RandFloat: Difference between revisions
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__ | ||
{{Server function}} | |||
This function | {{Deprecated|math.random}} | ||
This function generates a random number between 0 and 1. | |||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="lua">float randFloat ()</syntaxhighlight> | |||
=== | ===Returns=== | ||
Returns a random number between 0 and 1 in a float. | |||
==Example== | |||
This example outputs a random number in the chat box. | |||
<syntaxhighlight lang="lua">outputChatBox ( "Random float: " .. randFloat () )</syntaxhighlight> | |||
== | ==See Also== | ||
{{Utility functions}} |
Latest revision as of 12:18, 26 June 2014
This function is deprecated. This means that its use is discouraged and that it might not exist in future versions. | |
Please use math.random instead. |
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
- addDebugHook
- base64Decode
- base64Encode
- debugSleep
- decodeString
- encodeString
- fromJSON
- generateKeyPair
- getColorFromString
- getDevelopmentMode
- getDistanceBetweenPoints2D
- getDistanceBetweenPoints3D
- getEasingValue
- getNetworkStats
- getNetworkUsageData
- getPerformanceStats
- getRealTime
- getTickCount
- getTimerDetails
- getTimers
- getFPSLimit
- getUserdataType
- getVersion
- gettok
- isTransferBoxVisible
- setTransferBoxVisible
- hash
- inspect
- interpolateBetween
- iprint
- isOOPEnabled
- isTimer
- killTimer
- md5
- passwordHash
- passwordVerify
- pregFind
- pregMatch
- pregReplace
- removeDebugHook
- resetTimer
- setDevelopmentMode
- setFPSLimit
- setTimer
- ref
- deref
- sha256
- split
- teaDecode
- teaEncode
- toJSON
- tocolor
- getProcessMemoryStats
- utfChar
- utfCode
- utfLen
- utfSeek
- utfSub
- bitAnd
- bitNot
- bitOr
- bitXor
- bitTest
- bitLRotate
- bitRRotate
- bitLShift
- bitRShift
- bitArShift
- bitExtract
- bitReplace