vec2.new: Difference between revisions
Jump to navigation
Jump to search
(Created page with "{{ScriptItem2 |name = new Vec2 |side = shared |type = function |class = Vec2 |games = iii vc sa iv |desc = create a 2D vector |arg1 = float x The X value for the 2D vector. |arg2 = float y The Y value for the 2D vector. |return = Vec2 a 2D vector object }}") |
No edit summary |
||
| Line 6: | Line 6: | ||
|games = iii vc sa iv | |games = iii vc sa iv | ||
|desc = create a 2D vector | |desc = create a 2D vector | ||
|arg1 = float x The X value for the 2D vector. | |arg1 = [float x = 0.0] The X value for the 2D vector. | ||
|arg2 = float y The Y value for the 2D vector. | |arg2 = [float y = 0.0] The Y value for the 2D vector. | ||
|return = Vec2 a 2D vector object | |return = Vec2 a 2D vector object | ||
}} | }} | ||
Revision as of 16:01, 22 June 2026
Function Server and Client
![]()
Online and Offline
Available since Server 1.0.0, Client 1.0.0
Vec2 new Vec2([ float x = 0.0 ], [ float y = 0.0 ])
The new Vec2 function is used to create a 2D vector.
Parameters
| 1) | float | x | Optional, defaults to 0.0. The X value for the 2D vector. |
| 2) | float | y | Optional, defaults to 0.0. The Y value for the 2D vector. |
Return
| Vec2 | A 2D vector object. |
Types
Shared Vec2
Notes
There aren't any notes for this function.
Examples
There aren't any examples for this function.
Compatibility
There isn't any compatibility information for this function.