| Package | Description |
|---|---|
| me.lucko.helper.random |
| Modifier and Type | Class and Description |
|---|---|
static class |
VariableAmount.BaseAndAddition
Represents a base amount with a random addition, the final amount will be
the base amount plus a random amount between zero (inclusive) and the
addition (exclusive).
|
static class |
VariableAmount.BaseAndVariance
Represents a base amount with a variance, the final amount will be the
base amount plus or minus a random amount between zero (inclusive) and
the variance (exclusive).
|
static class |
VariableAmount.Fixed
Represents a fixed amount, calls to
VariableAmount.Fixed.getAmount(java.util.Random) will always return
the same fixed value. |
static class |
VariableAmount.OptionalAmount
Represents a variable amount which has a base and a chance of varying.
|
| Modifier and Type | Method and Description |
|---|---|
static VariableAmount |
VariableAmount.baseWithOptionalAddition(double base,
double addition,
double chance)
Creates a new variable about which has a base and a chance to apply a
random additional amount.
|
static VariableAmount |
VariableAmount.baseWithOptionalAddition(double base,
VariableAmount addition,
double chance)
Creates a new variable about which has a base and a chance to apply a
random additional amount.
|
static VariableAmount |
VariableAmount.baseWithOptionalVariance(double base,
double variance,
double chance)
Creates a new variable about which has a base and a chance to apply a
random variance.
|
static VariableAmount |
VariableAmount.baseWithOptionalVariance(double base,
VariableAmount variance,
double chance)
Creates a new variable about which has a base and a chance to apply a
random variance.
|
static VariableAmount |
VariableAmount.baseWithRandomAddition(double base,
double addition)
Creates a new variable amount which has a base and an additional amount.
|
static VariableAmount |
VariableAmount.baseWithRandomAddition(double base,
VariableAmount addition)
Creates a new variable amount which has a base and an additional amount.
|
static VariableAmount |
VariableAmount.baseWithVariance(double base,
double variance)
Creates a new variable about which has a base and variance.
|
static VariableAmount |
VariableAmount.baseWithVariance(double base,
VariableAmount variance)
Creates a new variable about which has a base and variance.
|
static VariableAmount |
VariableAmount.fixed(double value)
Creates a new 'fixed' variable amount, calls to
getAmount(java.util.Random) will
always return the fixed value. |
static VariableAmount |
VariableAmount.range(double min,
double max)
Creates a new variable amount which return values between the given min
(inclusive) and max (exclusive).
|
| Modifier and Type | Method and Description |
|---|---|
static VariableAmount |
VariableAmount.baseWithOptionalAddition(double base,
VariableAmount addition,
double chance)
Creates a new variable about which has a base and a chance to apply a
random additional amount.
|
static VariableAmount |
VariableAmount.baseWithOptionalVariance(double base,
VariableAmount variance,
double chance)
Creates a new variable about which has a base and a chance to apply a
random variance.
|
static VariableAmount |
VariableAmount.baseWithRandomAddition(double base,
VariableAmount addition)
Creates a new variable amount which has a base and an additional amount.
|
static VariableAmount |
VariableAmount.baseWithVariance(double base,
VariableAmount variance)
Creates a new variable about which has a base and variance.
|
Copyright © 2020. All rights reserved.