mirror of
https://github.com/Ellpeck/MLEM.git
synced 2024-11-22 04:53:29 +01:00
fixed Single min/max values being integers
This commit is contained in:
parent
b2b4dfbdc9
commit
88efc6b41c
1 changed files with 4 additions and 4 deletions
|
@ -101,7 +101,7 @@ namespace MLEM.Misc {
|
|||
/// <param name="maxValue">The (exclusive) maximum value.</param>
|
||||
/// <param name="seed">The seed to use.</param>
|
||||
/// <returns>The generated number.</returns>
|
||||
public static float Single(int maxValue, int seed) {
|
||||
public static float Single(float maxValue, int seed) {
|
||||
return maxValue * SingleRandom.Single(seed);
|
||||
}
|
||||
|
||||
|
@ -112,7 +112,7 @@ namespace MLEM.Misc {
|
|||
/// <param name="maxValue">The (exclusive) maximum value.</param>
|
||||
/// <param name="seeds">The seeds to use.</param>
|
||||
/// <returns>The generated number.</returns>
|
||||
public static float Single(int maxValue, params int[] seeds) {
|
||||
public static float Single(float maxValue, params int[] seeds) {
|
||||
return maxValue * SingleRandom.Single(seeds);
|
||||
}
|
||||
|
||||
|
@ -124,7 +124,7 @@ namespace MLEM.Misc {
|
|||
/// <param name="maxValue">The (exclusive) maximum value.</param>
|
||||
/// <param name="seed">The seed to use.</param>
|
||||
/// <returns>The generated number.</returns>
|
||||
public static float Single(int minValue, int maxValue, int seed) {
|
||||
public static float Single(float minValue, float maxValue, int seed) {
|
||||
return (maxValue - minValue) * SingleRandom.Single(seed) + minValue;
|
||||
}
|
||||
|
||||
|
@ -136,7 +136,7 @@ namespace MLEM.Misc {
|
|||
/// <param name="maxValue">The (exclusive) maximum value.</param>
|
||||
/// <param name="seeds">The seeds to use.</param>
|
||||
/// <returns>The generated number.</returns>
|
||||
public static float Single(int minValue, int maxValue, params int[] seeds) {
|
||||
public static float Single(float minValue, float maxValue, params int[] seeds) {
|
||||
return (maxValue - minValue) * SingleRandom.Single(seeds) + minValue;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue