Vector.Length2DSqr
From GMod Wiki
| Function | |
| Syntax | Vector:Length2DSqr( ) |
| Description: | |
| Returns the squared length of the X and Y plane of the vector. | |
| Returns: | Float |
| In Object: | Vector |
| Realm: |
|
| BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=Vector.Length2DSqr]Vector.Length2DSqr [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Examples
| Description | Get a vector's squared length on X and Y |
|---|---|
| Used on | |
| Code | print("Squared vector length in 2D is " .. Vector( 100, 0, 100 ):Length2DSqr()) |
| Output | Squared vector length in 2D is 10000 |