The callback to call whenever a value change.
Owner of callback
Position of the vector on the X axis.
Position of the vector on the Y axis.
The X value.
Set the x-component.
The new x-component of the vector
The Y value.
Set the y-component.
The new y-component of the vector
Return the absolute values of X and Y.
An optional destination.
Adds two vectors together. If no dest vector is specified, the operation is performed in-place.
The vector to add.
An optional destination.
Copies the x and y components from the source to the destination. The source and destination must be of the same type.
The source point.
Copies the x- and y-components from the source to the destination. The source and destination must be of the same type.
The type of your source, can also be a ObservableVector2.
The source point.
Divides two vectors piecewise.
The vector to divide with.
An optional destination.
Checks if two vectors are equal, using a threshold to avoid floating-point precision errors.
The other vector to compare with.
The minimal difference required to say that the vectors are different, to avoid floating-point precision errors.
Returns true if both X & Y are greater than the other vector.
The vector to compare with.
Returns the distance from the vector to the origin.
Multiplies two vectors together piecewise. If no dest vector is specified, the operation is performed in-place.
The vector to multiply with.
An optional destination.
Multiplies both the x- and y-components of a vector by -1. If no dest vector is specified, the operation is performed in-place.
An optional destination.
Normalizes a vector. If no dest vector is specified, the operation is performed in-place.
An optional destination.
Sets both the x- and y-components of the vector to 0.
Scales a vector by a scalar parameter. If no dest vector is specified, the operation is performed in-place.
The value to multiply the values to.
An optional destination.
Sets the point to a new x and y position. If y is omitted, both x and y will be set to x.
Returns the distance from the vector to the origin, squared.
Subtracts one vector from another. If no dest vector is specified, the operation is performed in-place.
The vector to subtract with.
An optional destination.
Convert this to a ObservableVector2.
Create an ObservableVector2 from a PIXI.ObservablePoint.
The point.
Generated using TypeDoc
Creates a new ObservableVector2.