Vector2

A two-dimensional vector.

# Properties

[{"index":"float x","0":"The x-axis value of the vector."}]

[{"index":"float y","0":"The y-axis value of the vector."}]

[{"index":"Vector2 down (Static) (ReadOnly) (HideFromInspector)","0":"You can simply use Vector2(0, -1)."}]

[{"index":"Vector2 left (Static) (ReadOnly) (HideFromInspector)","0":"You can simply use Vector2(-1, 0)."}]

[{"index":"Vector2 negativeInfinity (Static) (ReadOnly) (HideFromInspector)","0":"You can simply use Vector2(-inf, -inf)."}]

[{"index":"Vector2 one (Static) (ReadOnly) (HideFromInspector)","0":"You can simply use Vector2(1, 1)."}]

[{"index":"Vector2 positiveInfinity (Static) (ReadOnly) (HideFromInspector)","0":"You can simply use Vector2(inf, inf)."}]

[{"index":"Vector2 right (Static) (ReadOnly) (HideFromInspector)","0":"You can simply use Vector2(1, 0)."}]

[{"index":"Vector2 up (Static) (ReadOnly) (HideFromInspector)","0":"You can simply use Vector2(0, 1)."}]

[{"index":"Vector2 zero (Static) (ReadOnly) (HideFromInspector)","0":"You can simply use Vector2(0, 0)."}]

# Constructors

[{"index":"Vector2(float x, float y)","0":"Initializes Vector2 to the specified value."}]

# Methods

[{"index":"float Angle(Vector2 b)","0":"Finds the angle between two vectors. Returns a value between 0 and 180."}]

[{"index":"Vector2Int CeilToInt()","0":"Creates a Vector2Int Entity composed of the value that rounds up each element, and then returns it."}]

[{"index":"Vector2 Clone()","0":"Generates a copy."}]

[{"index":"float Distance(Vector2 b)","0":"Finds the distance between two vectors."}]

[{"index":"float Dot(Vector2 b)","0":"Finds the inner product of two vectors."}]

[{"index":"Vector2Int FloorToInt()","0":"Creates a Vector2Int Entity composed of the value that rounds down each element, and then returns it."}]

[{"index":"Vector2 Lerp(Vector2 b, float t)","0":"Creates Vector2 having the value using linear interpolation with t between two Vectors and then returns it."}]

[{"index":"Vector2 LerpUnclamped(Vector2 b, float t)","0":"Creates a Vector2 entity that linearly interpolates two Vectors with t and then returns it."}]

[{"index":"float Magnitude()","0":"Finds the size of a vector."}]

[{"index":"Vector2 Normalize()","0":"Creates the Vector2 entity with the same direction and size of 1 and then returns it."}]

[{"index":"Vector2 Perpendicular()","0":"Creates a Vector2 entity by rotating the Vector by 90 degrees counterclockwise and then returns it."}]

[{"index":"Vector2 Project(Vector2 b)","0":"Creates a Vector2 entity, which projected Vector to b and returns it."}]

[{"index":"Vector2 Reflect(Vector2 normal)","0":"Creates a Vector2 entity, which reflected Vector on the normal, and returns it."}]

[{"index":"Vector2Int RoundToInt()","0":"Creates a Vector2Int entity with the value rounded off for each element and then returns it."}]

[{"index":"float SignedAngle(Vector2 to)","0":"Finds the angle between two Vectors. If the angle relative to from is counterclockwise, the value is a positive number; if the angle is clockwise, the value is a negative number. Returns values between -180 to 180."}]

[{"index":"Vector2 Slerp(Vector2 b, float t)","0":"Creates a Vector2 entity that linearly interpolates two Vectors with t and then returns it. The value of t is between 0 to 1."}]

[{"index":"Vector2 SlerpUnclamped(Vector2 b, float t)","0":"Creates a Vector2 entity that spherical-linearly interpolates two Vectors with t and then returns it."}]

[{"index":"float SqrMagnitude()","0":"Finds the square of the size of a Vector."}]

[{"index":"Vector2Int ToVector2Int()","0":"Creates a Vector2Int entity with the value rounded down for each element and then returns it."}]

[{"index":"Vector3 ToVector3()","0":"Creates a Vector3 entity with x and y elements and z=0, and then returns it."}]

[{"index":"float Angle(Vector2 a, Vector2 b) (Static)","0":"Finds the angle between two vectors. Returns a value between 0 and 180."}]

[{"index":"Vector2Int CeilToInt(Vector2 a) (Static)","0":"Creates a Vector2Int entity with the value rounded up for each element and then returns it."}]

[{"index":"float Distance(Vector2 a, Vector2 b) (Static)","0":"Finds the distance between two vectors."}]

[{"index":"float Dot(Vector2 a, Vector2 b) (Static)","0":"Finds the inner product of two vectors."}]

[{"index":"Vector2Int FloorToInt(Vector2 a) (Static)","0":"Creates a Vector2Int entity with the value rounded down for each element and then returns it."}]

[{"index":"Vector2 Lerp(Vector2 a, Vector2 b, float t) (Static)","0":"Creates Vector2 having the value using linear interpolation with t between two Vectors and then returns it."}]

[{"index":"Vector2 LerpUnclamped(Vector2 a, Vector2 b, float t) (Static)","0":"Creates a Vector2 entity that linearly interpolates two Vectors with t and then returns it."}]

[{"index":"float Magnitude(Vector2 a) (Static)","0":"Finds the size of a vector."}]

[{"index":"Vector2 Normalize(Vector2 a) (Static)","0":"Creates the Vector2 entity with the same direction and size of 1 and then returns it."}]

[{"index":"Vector2 Perpendicular(Vector2 a) (Static)","0":"Creates a Vector2 entity by rotating the Vector by 90 degrees counterclockwise and then returns it."}]

[{"index":"Vector2 Project(Vector2 a, Vector2 b) (Static)","0":"Creates a Vector2 entity, which projected a to b, and returns it."}]

[{"index":"Vector2 Reflect(Vector2 vector, Vector2 normal) (Static)","0":"Creates a Vector2 entity, which reflects the Vector on the normal, and returns it."}]

[{"index":"Vector2Int RoundToInt(Vector2 a) (Static)","0":"Creates a Vector2Int entity with the value rounded off for each element and then returns it."}]

[{"index":"float SignedAngle(Vector2 from, Vector2 to) (Static)","0":"Finds the angle between two Vectors. If the angle relative to from is counterclockwise, the value is a positive number; if the angle is clockwise, the value is a negative number. Returns values between -180 to 180."}]

[{"index":"Vector2 Slerp(Vector2 a, Vector2 b, float t) (Static)","0":"Creates a Vector2 entity that linearly interpolates two Vectors with t and then returns it. The value of t is between 0 to 1."}]

[{"index":"Vector2 SlerpUnclamped(Vector2 a, Vector2 b, float t) (Static)","0":"Creates a Vector2 entity that spherical-linearly interpolates two Vectors with t and then returns it."}]

[{"index":"float SqrMagnitude(Vector2 a) (Static)","0":"Finds the square of the size of a Vector."}]

[{"index":"Vector2Int ToVector2Int(Vector2 a) (Static)","0":"Creates a Vector2Int entity with the value rounded down for each element and then returns it."}]

[{"index":"Vector3 ToVector3(Vector2 a) (Static)","0":"Creates the Vector3 entity with x and y elements and z=0, and then returns it."}]

# Operators

[{"index":"Vector2 Addition(Vector2 left, Vector2 right) (Static)","0":"Returns a new Vector2 entity obtained by adding two vectors."}]

[{"index":"Vector2 Division(Vector2 left, float right) (Static)","0":"Returns a new Vector2 entity by dividing the vector by a real number."}]

[{"index":"Vector2 Division(Vector2 left, Vector2 right) (Static)","0":"Returns a new Vector2 entity by dividing the same value. The calculation result is Vector2(left.x \/ right.x, left.y \/ right.y)."}]

[{"index":"boolean Equality(Vector2 left, Vector2 right) (Static)","0":"Checks if the two vectors are the same. Returns true if they're the same. Otherwise, returns false."}]

[{"index":"boolean Inequality(Vector2 left, Vector2 right) (Static)","0":"Checks if the two vectors are different. Returns false if they're the same. Otherwise, returns true."}]

[{"index":"Vector2 Multiply(float left, Vector2 right) (Static)","0":"Returns a new Vector2 entity by multiplying the vector by a real number."}]

[{"index":"Vector2 Multiply(Vector2 left, float right) (Static)","0":"Returns a new Vector2 entity by multiplying the vector by a real number."}]

[{"index":"Vector2 Multiply(Vector2 left, Vector2 right) (Static)","0":"Returns a new Vector2 entity by multiplying the same value. The calculation result is Vector2(left.x * right.x, left.y * right.y)."}]

[{"index":"Vector2 Subtraction(Vector2 left, Vector2 right) (Static)","0":"Returns a new Vector2 entity obtained by subtracting two vectors."}]

[{"index":"Vector2 UnaryNegation(Vector2 value) (Static)","0":"Returns a new Vector2 entity that represents a reversed vector."}]