Package tripleplay.particle.init
Class Velocity
java.lang.Object
tripleplay.particle.init.Velocity
Initializers for a particle's velocity.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Initializer
constant
(pythagoras.f.Vector velocity) Returns an initializer that provides a constant velocity.static Initializer
increment
(float dx, float dy) Returns an initializer that increments the previously assigned velocity by the specified amounts.static Initializer
randomCircle
(Randoms rando, float maximum) Returns an initializer that provides a velocity in a random direction with the specified maximum magnitude.static Initializer
randomCircle
(Randoms rando, float min, float max) Returns an initializer that provides a velocity in a random direction with the specified minimum and maximum magnitude.static Initializer
randomNormal
(Randoms rando, float mean, float dev) Returns an initializer that provides a normally distributed random velocity with the specified mean and standard deviation parameters.static Initializer
randomNormal
(Randoms rando, float xMean, float xDev, float yMean, float yDev) Returns an initializer that provides a normally distributed random velocity with the specified mean and standard deviation parameters.static Initializer
randomSquare
(Randoms rando, float xRange, float yRange) Returns an initializer that provides a uniformly distributed random velocity.static Initializer
randomSquare
(Randoms rando, float minX, float maxX, float minY, float maxY) Returns an initializer that provides a uniformly distribted random velocity in the rangeminX
tomaxX
and similarly for the y direction.
-
Constructor Details
-
Velocity
public Velocity()
-
-
Method Details
-
constant
Returns an initializer that provides a constant velocity. -
randomSquare
Returns an initializer that provides a uniformly distributed random velocity.- Parameters:
xRange
- x velocity will range from -xRange/2 to xRange/2.yRange
- y velocity will range from -yRange/2 to yRange/2.
-
randomSquare
public static Initializer randomSquare(Randoms rando, float minX, float maxX, float minY, float maxY) Returns an initializer that provides a uniformly distribted random velocity in the rangeminX
tomaxX
and similarly for the y direction. -
randomNormal
Returns an initializer that provides a normally distributed random velocity with the specified mean and standard deviation parameters. -
randomNormal
public static Initializer randomNormal(Randoms rando, float xMean, float xDev, float yMean, float yDev) Returns an initializer that provides a normally distributed random velocity with the specified mean and standard deviation parameters. -
randomCircle
Returns an initializer that provides a velocity in a random direction with the specified maximum magnitude. -
randomCircle
Returns an initializer that provides a velocity in a random direction with the specified minimum and maximum magnitude. -
increment
Returns an initializer that increments the previously assigned velocity by the specified amounts.
-