Vector Class
Vector contains two values x and y, which determines direction in particle systems' classes
Item Index
Methods
copy
()
Create copy of the current vector
Returns:
Vector
fromAngle
(
angle
magnitude
Create new vector basd on an angle and a magnitude
Returns:
Vector
getAngle
()
Return vector angle in radians
Returns:
Float vector angle
getAngleDegrees
()
Return vector angle degree
Returns:
Float
getMagnitude
()
Get Magnitude of the vector
Returns:
Float
init
() protected
Init instance. The init method sets all needed emiter properties acording to developer requirements or to default values (default: [0, 0]).
jitter
(
jitterAmount
Create new vector based on jitter amount
Parameters:
-
jitterAmount
IntegerjitterAmount
Returns:
Vector
multiply
(
scaleFactor
Multyply vector coordinates by scaleFactor
Parameters:
-
scaleFactor
Integerscale factor
vectorTo
(
vector
Create new vector based on vector passed as parameter
Parameters:
-
vector
Vectorvector
Returns:
Vector