Class Vector2Int
A pure .NET implemenation of Unity's Vector2Int.
See Unity's docs for more details.
Inheritance
System.Object
Vector2Int
Assembly: Sylves.dll
Syntax
public sealed class Vector2Int : ValueType
Constructors
Vector2Int(Int32, Int32)
Declaration
public Vector2Int(int x, int y)
Parameters
Type |
Name |
Description |
System.Int32 |
x |
|
System.Int32 |
y |
|
Properties
down
Declaration
public static Vector2Int down { get; }
Property Value
Item[Int32]
Declaration
public int this[int index] { get; set; }
Parameters
Type |
Name |
Description |
System.Int32 |
index |
|
Property Value
Type |
Description |
System.Int32 |
|
left
Declaration
public static Vector2Int left { get; }
Property Value
magnitude
Declaration
public float magnitude { get; }
Property Value
Type |
Description |
System.Single |
|
one
Declaration
public static Vector2Int one { get; }
Property Value
right
Declaration
public static Vector2Int right { get; }
Property Value
sqrMagnitude
Declaration
public int sqrMagnitude { get; }
Property Value
Type |
Description |
System.Int32 |
|
up
Declaration
public static Vector2Int up { get; }
Property Value
x
Declaration
public int x { get; set; }
Property Value
Type |
Description |
System.Int32 |
|
y
Declaration
public int y { get; set; }
Property Value
Type |
Description |
System.Int32 |
|
zero
Declaration
public static Vector2Int zero { get; }
Property Value
Methods
CeilToInt(Vector3)
Declaration
public static Vector2Int CeilToInt(Vector3 v)
Parameters
Returns
Clamp(Vector2Int, Vector2Int)
Declaration
public void Clamp(Vector2Int min, Vector2Int max)
Parameters
Distance(Vector2Int, Vector2Int)
Declaration
public static float Distance(Vector2Int a, Vector2Int b)
Parameters
Returns
Type |
Description |
System.Single |
|
Equals(Vector2Int)
Declaration
public bool Equals(Vector2Int other)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Equals(Object)
Declaration
public override bool Equals(object other)
Parameters
Type |
Name |
Description |
System.Object |
other |
|
Returns
Type |
Description |
System.Boolean |
|
FloorToInt(Vector3)
Declaration
public static Vector2Int FloorToInt(Vector3 v)
Parameters
Returns
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type |
Description |
System.Int32 |
|
Max(Vector2Int, Vector2Int)
Declaration
public static Vector2Int Max(Vector2Int lhs, Vector2Int rhs)
Parameters
Returns
Min(Vector2Int, Vector2Int)
Declaration
public static Vector2Int Min(Vector2Int lhs, Vector2Int rhs)
Parameters
Returns
RoundToInt(Vector3)
Declaration
public static Vector2Int RoundToInt(Vector3 v)
Parameters
Returns
Scale(Vector2Int)
Declaration
public void Scale(Vector2Int scale)
Parameters
Scale(Vector2Int, Vector2Int)
Declaration
public static Vector2Int Scale(Vector2Int a, Vector2Int b)
Parameters
Returns
Set(Int32, Int32)
Declaration
public void Set(int x, int y)
Parameters
Type |
Name |
Description |
System.Int32 |
x |
|
System.Int32 |
y |
|
ToString()
Declaration
public override string ToString()
Returns
Type |
Description |
System.String |
|
ToString(String)
Declaration
public string ToString(string format)
Parameters
Type |
Name |
Description |
System.String |
format |
|
Returns
Type |
Description |
System.String |
|
Operators
Addition(Vector2Int, Vector2Int)
Declaration
public static Vector2Int operator +(Vector2Int a, Vector2Int b)
Parameters
Returns
Division(Vector2Int, Int32)
Declaration
public static Vector2Int operator /(Vector2Int a, int b)
Parameters
Returns
Equality(Vector2Int, Vector2Int)
Declaration
public static bool operator ==(Vector2Int lhs, Vector2Int rhs)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Implicit(Vector2Int to Vector2)
Declaration
public static implicit operator Vector2(Vector2Int v)
Parameters
Returns
Inequality(Vector2Int, Vector2Int)
Declaration
public static bool operator !=(Vector2Int lhs, Vector2Int rhs)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Multiply(Vector2Int, Vector2Int)
Declaration
public static Vector2Int operator *(Vector2Int a, Vector2Int b)
Parameters
Returns
Multiply(Vector2Int, Int32)
Declaration
public static Vector2Int operator *(Vector2Int a, int b)
Parameters
Returns
Multiply(Int32, Vector2Int)
Declaration
public static Vector2Int operator *(int a, Vector2Int b)
Parameters
Returns
Subtraction(Vector2Int, Vector2Int)
Declaration
public static Vector2Int operator -(Vector2Int a, Vector2Int b)
Parameters
Returns
UnaryNegation(Vector2Int)
Declaration
public static Vector2Int operator -(Vector2Int a)
Parameters
Returns