Skip to content

Commit

Permalink
v0.8.28
Browse files Browse the repository at this point in the history
- Minor fix in method `meico.supplementary.RandomNumberProvider.getValue(int index)` to ensure that only non-negative index values are processed.
  • Loading branch information
axelberndt committed Nov 9, 2021
1 parent fe38b9f commit baaccfa
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions history.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
### Version History


#### v0.8.28
- Minor fix in method `meico.supplementary.RandomNumberProvider.getValue(int index)` to ensure that only non-negative index values are processed.


#### v0.8.27
- A little optimization in method `meico.audio.Audio.convertSpectrogramToImage()`. In addition, this method has been extended with a new argument `normalize` to give applications the possibility to decide whether the spectrogram values should or should not be normalized for rendering.
- Internal Verovio update to v3.7.0-dev-e93a13d.
Expand Down
2 changes: 1 addition & 1 deletion src/meico/Meico.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @author Axel Berndt
*/
public class Meico {
public static final String version = "0.8.27";
public static final String version = "0.8.28";

public static void main(String[] args) {
System.out.println("meico v" + Meico.version);
Expand Down
2 changes: 2 additions & 0 deletions src/meico/supplementary/RandomNumberProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,8 @@ else if (value < lowerLimit)
* @return
*/
public double getValue(int index) {
index = Math.max(0, index); // ensure a positive index value

if (this.distributionType == RandomNumberProvider.DISTRIBUTION_LIST) // if distribution is based on predefined list
return this.series.get(index % this.series.size()); // read the list value and repeat the list if the index exeeds its length

Expand Down

0 comments on commit baaccfa

Please sign in to comment.