Enum Class Particle.RandomizationType
- All Implemented Interfaces:
Serializable, Comparable<Particle.RandomizationType>, Constable
- Enclosing class:
Particle
The randomization type for the particle, which controls how offset and speed are randomized.
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionMultiplies each offset axis independently by its own uniform random value in the range [0, 1) similar toRandom.nextDouble().Multiplies each offset axis and each speed axis independently by its own uniform random value in the range [0, 1) similar toRandom.nextDouble().The default randomization type, which multiplies each offset axis and each speed axis independently by its own Gaussian random value (similar toRandom.nextGaussian()(mean 0, standard deviation 1). -
Method Summary
Modifier and TypeMethodDescriptionstatic Particle.RandomizationTypeReturns the enum constant of this class with the specified name.static Particle.RandomizationType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
DEFAULT
The default randomization type, which multiplies each offset axis and each speed axis independently by its own Gaussian random value (similar toRandom.nextGaussian()(mean 0, standard deviation 1). -
ALTERNATIVE
Multiplies each offset axis independently by its own uniform random value in the range [0, 1) similar toRandom.nextDouble(). Speed is left unmodified. -
ALTERNATIVE_WITH_SPEED
Multiplies each offset axis and each speed axis independently by its own uniform random value in the range [0, 1) similar toRandom.nextDouble().
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-