Return a two-dimensional vector object.
Name | Type | Default | Description |
---|---|---|---|
x |
Number | 0 |
The x component of this Vector2 |
y |
Number | 0 |
The y component of this Vector2 |
Members
-
- Default Value:
- 0
-
- Default Value:
- 0
Methods
-
abs ()Vector2
-
Returns vector2 absolute.
Returns:
Type Description Vector2 -
add (vector2)Vector2
-
Add the provided Vector to this one.
Name Type Description vector2
Vector2 Anther vector2.
Returns:
Type Description Vector2 -
Returns the cross product of this vector by another.
Name Type Default Description vector2
Vector2 this optional Anther vector2.
Returns:
Type Description Number -
Returns the dot product of this vector by another.
Name Type Default Description vector2
Vector2 this optional Anther vector2.
Returns:
Type Description Number -
max (value)Vector2
-
Returns a new vector2 so that each component of the new vector2 has a value greater
than or equal to the specified value.Name Type Description value
Number The specified value.
Returns:
Type Description Vector2 -
min (value)Vector2
-
Returns a new vector2 so that the value of each component of the new vector2 is less
than or equal to the specified value.Name Type Description value
Number The specified value.
Returns:
Type Description Vector2 -
Returns vector2 mode.
Returns:
Type Description Number -
sub (vector2)Vector2
-
Subtract the provided vector from this one.
Name Type Description vector2
Vector2 Anther vector2.
Returns:
Type Description Vector2