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/util/math/constraints/num/mutable/NumMutable.java

41 lines
556 B

package mightypork.gamecore.util.math.constraints.num.mutable;
import mightypork.gamecore.util.math.constraints.num.Num;
/**
* Mutable numeric variable
*
* @author Ondřej Hruška (MightyPork)
*/
public abstract class NumMutable extends Num {
/**
* Assign a value
*
* @param value new value
*/
public abstract void setTo(double value);
/**
* Assign a value
*
* @param value new value
*/
public void setTo(Num value)
{
setTo(value.value());
}
/**
* Set to zero
*/
public void reset()
{
setTo(0);
}
}