S&box Wiki




static Vector2 Down
static Vector2 Left
static Vector2 One
Returns a Vector with every component set to 1
static Vector2 Right
static Vector2 Up
static Vector2 Zero
Returns a Vector with every component set to 0


bool IsNearZeroLength { get; }
returns true if the squared length is less than 1e-8 (which is really near zero)
float Length { get; }
Returns the magnitude of the vector
float LengthSquared { get; }
This is faster than Length, so is better to use in certain circumstances
Vector2 Normal { get; }
Return the same vector but with a length of one
static Vector2 Random { get; }
float x { get; set; }
float y { get; set; }


static Vector2 FromRadian( float radian )
TODO: Is this useful?
static double GetDistance( Vector2 a, Vector2 b )
static double GetDot( Vector2 a, Vector2 b )
static Vector2 Parse( string str )
Given a string, try to convert this into a vector4. The format is "x,y,z,w".

Special Pages



Render Time: 27ms

DB GetPage 7
Generate Html 0
SaveChanges (1) 16
Render Body 0
Render Sidebar 1