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/utils/math/num/NumMutable.java

38 lines
449 B

package mightypork.utils.math.num;
/**
* Mutable numeric variable
*
* @author 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 assign(Num value)
{
setTo(eval(value));
}
/**
* Set to zero
*/
public void reset()
{
setTo(0);
}
}