public class Percentage
extends java.lang.Object
| Constructor and Description |
|---|
Percentage() |
| Modifier and Type | Method and Description |
|---|---|
static double |
base(double percentageDecimal,
double value)
Calculates the base value of a given percentage.
|
static float |
base(float percentageDecimal,
float value)
Calculates the base value of a given percentage.
|
static double |
percentage(double value,
double base)
Calculates the percentage of a given value.
|
static float |
percentage(float value,
float base)
Calculates the percentage of a given value.
|
static double |
toDecimal(double percentage)
Converts a percentage to a decimal.
|
static float |
toDecimal(float percentage)
Converts a percentage to a decimal.
|
static double |
toPercentage(double decimal)
Converts a decimal to a percentage.
|
static float |
toPercentage(float decimal)
Converts a decimal to a percentage.
|
static double |
value(double percentageDecimal,
double base)
Calculates the percentage value of a given base.
|
static float |
value(float percentageDecimal,
float base)
Calculates the percentage value of a given base.
|
public static float value(float percentageDecimal,
float base)
percentageDecimal - The percentage as decimal.base - The base value.public static float base(float percentageDecimal,
float value)
percentageDecimal - The percentage as decimal.value - The percentage value.public static float percentage(float value,
float base)
value - The percentage value.base - The base value.public static float toDecimal(float percentage)
percentage - The percentage.public static float toPercentage(float decimal)
decimal - The decimal.public static double value(double percentageDecimal,
double base)
percentageDecimal - The percentage as decimal.base - The base value.public static double base(double percentageDecimal,
double value)
percentageDecimal - The percentage as decimal.value - The percentage value.public static double percentage(double value,
double base)
value - The percentage value.base - The base value.public static double toDecimal(double percentage)
percentage - The percentage.public static double toPercentage(double decimal)
decimal - The decimal.