GetDistanceBetweenPoints2D: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 17: | Line 17: | ||
vehicle2x, vehicle2y, vehicle2z = getVehiclePosition ( vehicle2 ) | vehicle2x, vehicle2y, vehicle2z = getVehiclePosition ( vehicle2 ) | ||
outputChatBox ( "The map distance between vehicle and vehicl2 is ", getDistanceBetweenPoints2D ( vehiclex, vehicley, vehicle2x, vehicle2y ) )</syntaxhighlight> | outputChatBox ( "The map distance between vehicle and vehicl2 is ", getDistanceBetweenPoints2D ( vehiclex, vehicley, vehicle2x, vehicle2y ) )</syntaxhighlight> | ||
==See Also== | |||
{{Utility functions}} |
Revision as of 20:26, 20 May 2006
Description
This function returns the distance between two 2 dimensional points using the pythagorean theorem.
Syntax
getDistanceBetweenPoints2D ( x1, y1, x2, y2 )
Required Arguments
- x1: The X position of the first point
- y1: The Y position of the first point
- x2: The X position of the second point
- y2: The Y position of the second point
Example
vehiclex, vehicley, vehiclez = getVehiclePosition ( vehicle ) vehicle2x, vehicle2y, vehicle2z = getVehiclePosition ( vehicle2 ) outputChatBox ( "The map distance between vehicle and vehicl2 is ", getDistanceBetweenPoints2D ( vehiclex, vehicley, vehicle2x, vehicle2y ) )
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