Mixins for the CreateJS Point class, which include methods for calculating the dot product, length, distance, normalize, etc.
add
other
Adds the x and y values of a point to this point.
other
Point
The point to add to this one
distance
other
Calculates the distance between this and another point.
other
Point
The point to calculate the distance to.
The distance.
distanceSq
other
Calculates the squared distance between this and another point.
other
Point
The point to calculate the distance to.
The distance squared.
dotProd
other
Returns the dot product between this point and another one.
other
Point
The point to form a dot product with
The dot product between the two points.
lengthSq
Returns the squared length (or magnitude) of this point. This is faster than length().
The length squared of this point.
scaleBy
value
Multiplies the x and y values of this point by a value.
value
Number
The value to scale by.
subtract
other
Subtracts the x and y values of a point from this point.
other
Point
The point to subtract from this one
truncate
maxLength
Truncate the length of the point to a maximum.
maxLength
Number
The maximum length to allow in this point.