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.
30 lines
397 B
30 lines
397 B
package mightypork.gamecore.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));
|
|
}
|
|
|
|
}
|
|
|