Rogue: Savage Rats, a retro-themed dungeon crawler
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
rogue-savage-rats/src/mightypork/gamecore/resources/audio/Volume.java

29 lines
411 B

package mightypork.gamecore.resources.audio;
import mightypork.utils.math.Calc;
import mightypork.utils.struct.Mutable;
/**
* Mutable volume 0-1
*
* @author Ondřej Hruška (MightyPork)
*/
public class Volume extends Mutable<Double> {
/**
* @param d initial value
*/
public Volume(Double d) {
super(d);
}
@Override
public void set(Double d)
{
super.set(Calc.clamp(d, 0, 1));
}
}