Angle.__tostring

From GMod Wiki

Jump to: navigation, search
Warning 64 light.png Internal Function: Angle.__tostring
Angle.__tostring is an internal function. This means you will be able to call it, but you really shouldn't.


Function
Syntax Angle.__tostring( )
Description:
This is the function called by lua everytime you want to turn an angle into a string. This means you don't have to call it directly.
Returns: String
In Object: Entity
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Angle. tostring]Angle. tostring [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]


Examples

DescriptionConverts an angle into a string
Used onNewerShared.png
Code
myAngleString = tostring(Angle(2,2,2))
Msg("myAngleString is: " .. myAngleString .. "\n")
OutputmyAngleString becomes the string "2.000 2.000 2.000"
The output in the console is: "myAngleString is: 2.000 2.000 2.000"


Additional Notes

You might have noticed that some objects have a function called __tostring. Well, you don't run __tostring like this - You run __tostring by converting the Angle object to a string with the tostring() function.

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox