FastVector2

A two-dimensional vector.

# Properties

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

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

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

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

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

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

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

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

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

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

# Constructors

[{"index":"FastVector2(number x, number y)","0":"Reset FastVector2 to the specified value."}]

[{"index":"FastVector2(Vector2 vector2)","0":"Reset FastVector2 to the specified value."}]

# Methods

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

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

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

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

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

[{"index":"FastVector2 FloorToint()","0":"Creates a FastVector2 entity composed of the value that rounds down each element, then returns it."}]

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

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

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

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

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

[{"index":"FastVector2 Project(FastVector2 b)","0":"Creates a FastVector2 entity, which projects Vector with b and then returns it."}]

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

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

[{"index":"number SignedAngle(FastVector2 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":"FastVector2 Slerp(FastVector2 b, number t)","0":"Creates a FastVector2 entity that spherical-linearly interpolates two Vectors with t and then returns it. The value of t is between 0 to 1."}]

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

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

[{"index":"FastVector2 ToVector2Int()","0":"Creates a FastVector2 entity composed of the value that rounds down each element, then returns it."}]

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

[{"index":"void Add(FastVector2 b)","0":"Adds value. Functions the same as the += operator, but it doesn't create a new entity, which results in faster execution."}]

[{"index":"void Sub(FastVector2 b)","0":"Subtracts value. Functions the same as the -= operator, but it doesn't create a new entity, which results in faster execution."}]

[{"index":"void Mul(number num)","0":"Multiplies value. Functions the same as the *= operator, but it doesn't create a new entity, which results in faster execution."}]

[{"index":"void Div(number num)","0":"Divides value. Functions the same as the \/= operator, but it doesn't create a new entity, which results in faster execution."}]

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

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

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

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

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

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

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

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

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

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

[{"index":"FastVector2 Project(FastVector2 a, FastVector2 b) (Static)","0":"Creates a FastVector2 entity, which projects Vector with b and then returns it."}]

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

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

[{"index":"number SignedAngle(FastVector2 from, FastVector2 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":"FastVector2 Slerp(FastVector2 a, FastVector2 b, number t) (Static)","0":"Creates a FastVector2 entity that spherical-linearly interpolates two Vectors with t and then returns it. The value of t is between 0 to 1."}]

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

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

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

[{"index":"FastVector2 ToVector2Int(FastVector2 a) (Static)","0":"Creates a FastVector2 entity composed of the value that rounds down each element, then returns it."}]

[{"index":"void Add(FastVector2 a, FastVector2 b) (Static)","0":"Adds value. Functions the same as the += operator, but it doesn't create a new entity, which results in faster execution."}]

[{"index":"void Sub(FastVector2 a, FastVector2 b) (Static)","0":"Subtracts value. Functions the same as the -= operator, but it doesn't create a new entity, which results in faster execution."}]

[{"index":"void Mul(FastVector2 a, number num) (Static)","0":"Multiplies value. Functions the same as the *= operator, but it doesn't create a new entity, which results in faster execution."}]

[{"index":"void Div(FastVector2 a, number num) (Static)","0":"Divides value. Functions the same as the \/= operator, but it doesn't create a new entity, which results in faster execution."}]

# Operators

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

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

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

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

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

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

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

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

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

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