struct Vector2Int
in global
😔 No documentation found.
public int x
The X component of this integer vector.
public int y
The Y component of this integer vector.
public Vector2Int( int x, int y )
Initializes an integer vector with given components.
xThe X component.yThe Y component.
public Vector2Int( int all = 0 )
Initializes an integer vector with all components set to the same value.
allThe value of the X and Y components.
public Vector2Int( Vector2Int vector2Int )
Initializes an integer vector with given components from another integer vector.
public Vector2Int( Vector3Int vector3Int )
Initializes an integer vector with given components from another integer vector, discarding the Z component.
public static Vector2Int One
An integer vector with all components set to 1.
public static Vector2Int Zero
An integer vector with all components set to 0.
public static Vector2Int Right
An integer vector with X set to 1. This represents the right direction.
public static Vector2Int Left
An integer vector with X set to -1. This represents the left direction.
public static Vector2Int Up
An integer vector with Y set to 1. This represents the up direction.
public static Vector2Int Down
An integer vector with Y set to -1. This represents the down direction.
public Vector2 Normal { get; }
Returns a unit version of this vector. Keep in mind this returns a Vector2 and not a Vector2Int.
public float Degrees { get; }
Return the angle of this vector in degrees, always between 0 and 360.
public float Length { get; }
Length (or magnitude) of the integer vector (Distance from 0,0)
public int LengthSquared { get; }
Squared length of the integer vector. This is faster than Length, and can be used for things like comparing distances, as long as only squared values are used."/>
public Vector2Int Perpendicular { get; }
Returns an integer vector that runs perpendicular to this one.
public bool IsZeroLength { get; }
Whether the length of this vector is zero or not.
public bool IsNearlyZero( int tolerance = 0 )
Returns true if value on every axis is less than or equal to tolerance
public Vector2Int ComponentMin( Vector2Int other )
Returns an integer vector that has the minimum values on each axis of the two input vectors.
public Vector2Int ComponentMax( Vector2Int other )
Returns an integer vector that has the maximum values on each axis of the two input vectors.
public float Distance( Vector2Int other )
Returns the distance between this vector and another.
public float Distance( Vector2 other )
Returns the distance between this vector and another.
public Vector2Int SnapToGrid( int gridSize, bool sx = True, bool sy = True )
Snap to grid along any of the 2 axes.
public static Vector2Int Min( Vector2Int a, Vector2Int b )
Returns an integer vector that has the minimum values on each axis between 2 given vectors.
public static Vector2Int Max( Vector2Int a, Vector2Int b )
Returns an integer vector that has the maximum values on each axis between 2 given vectors.
public Vector2Int WithX( int x )
Returns this integer vector with given X component.
public Vector2Int WithY( int y )
Returns this integer vector with given Y component.
public static Vector2Int Parse( string str )
Given a string, try to convert this into a Vector2Int. Example formatting is "x,y", "[x,y]", "x y", etc.
public static Vector2Int Parse( string str, IFormatProvider provider )
🤡 Doc inheritance is not yet supported.
No summary.
public static bool TryParse( string str, IFormatProvider info, ref Vector2Int result )
🤡 Doc inheritance is not yet supported.
No summary.
public static Vector2Int op_Addition( Vector2Int c1, int c2 )
😔 No documentation found.
public static bool op_Equality( Vector2Int left, Vector2Int right )
😔 No documentation found.
public static Vector2 op_Addition( Vector2Int c1, float c2 )
😔 No documentation found.
public static Vector2Int op_Addition( Vector2Int c1, Vector2Int c2 )
😔 No documentation found.
public static Vector2 op_Addition( Vector2Int c1, Vector2 c2 )
😔 No documentation found.
public static Vector2 op_Addition( Vector2 c1, Vector2Int c2 )
😔 No documentation found.
public static Vector2Int op_Subtraction( Vector2Int c1, int c2 )
😔 No documentation found.
public bool Equals( object obj )
😔 No documentation found.
public static Vector2Int op_Subtraction( Vector2Int c1, Vector2Int c2 )
😔 No documentation found.
public static Vector2 op_Subtraction( Vector2Int c1, float c2 )
😔 No documentation found.
public bool Equals( Vector2Int o )
😔 No documentation found.
public int GetHashCode( )
😔 No documentation found.
public Type GetType( )
😔 No documentation found.
public static Vector2 op_Subtraction( Vector2 c1, Vector2Int c2 )
😔 No documentation found.
public static bool op_Inequality( Vector2Int left, Vector2Int right )
😔 No documentation found.
public static Vector2 op_Subtraction( Vector2Int c1, Vector2 c2 )
😔 No documentation found.
public string ToString( )
😔 No documentation found.
public static Vector2 op_Division( Vector2 c1, Vector2Int c2 )
😔 No documentation found.
public static Vector2Int op_Multiply( Vector2Int c1, int c2 )
😔 No documentation found.
public static Vector2 op_Multiply( Vector2Int c1, float c2 )
😔 No documentation found.
public static Vector2Int op_Multiply( Vector2Int c1, Vector2Int c2 )
😔 No documentation found.
public static Vector3Int op_Multiply( Vector2Int c1, Vector3Int c2 )
😔 No documentation found.
public static Vector2 op_Multiply( Vector2Int c1, Vector2 c2 )
😔 No documentation found.
public static Vector2 op_Multiply( Vector2 c1, Vector2Int c2 )
😔 No documentation found.
public static Vector2Int op_Implicit( int value )
😔 No documentation found.
public static Vector2Int op_Explicit( Vector2 value )
😔 No documentation found.
public Vector2Int Abs( )
😔 No documentation found.
public static Vector2 op_Implicit( Vector2Int value )
😔 No documentation found.
public static Vector2Int op_Explicit( Vector4 value )
😔 No documentation found.
public int Item { get; set; }
😔 No documentation found.
public static Vector2Int op_Division( Vector2Int c1, Vector2Int c2 )
😔 No documentation found.
public static Vector2 op_Division( Vector2Int c1, float c2 )
😔 No documentation found.
public static Vector2Int op_Division( Vector2Int c1, int c2 )
😔 No documentation found.
public static Vector2Int op_UnaryNegation( Vector2Int c1 )
😔 No documentation found.
public void Write( BinaryWriter writer )
😔 No documentation found.
public Vector2Int Read( BinaryReader reader )
😔 No documentation found.
public static Vector2Int op_Explicit( Vector3 value )
😔 No documentation found.
public static Vector2 op_Division( Vector2Int c1, Vector2 c2 )
😔 No documentation found.