If this vector's x or y value is greater than the max vector's x or y value, it is replaced by the corresponding value. If this vector's x or y value is less than the min vector's x or y value, it is replaced by the corresponding value.
A reference to this vector.
Computes the square of the Euclidean length (straight-line length) from (0, 0) to (x, y). If you are comparing the lengths of vectors, you should compare the length squared instead as it is slightly more efficient to calculate.
The square length of this vector.
Sets the vector components.
The value of the x component.
The value of the y component.
A reference to this vector.
Class representing a 2D vector. A 2D vector is an ordered pair of numbers (labeled x and y), which can be used to represent a number of things, such as:
(0, 0)to(x, y)and the direction is also measured from(0, 0)towards(x, y).(x, y)in the corresponding order.Example
See
https://github.com/mrdoob/three.js/blob/master/src/math/Vector2.js