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.
43 lines
514 B
43 lines
514 B
10 years ago
|
package mightypork.gamecore.util.math.constraints.num.mutable;
|
||
10 years ago
|
|
||
10 years ago
|
|
||
10 years ago
|
import mightypork.gamecore.util.math.constraints.num.Num;
|
||
10 years ago
|
|
||
|
|
||
|
/**
|
||
|
* Mutable numeric variable.
|
||
|
*
|
||
|
* @author MightyPork
|
||
|
*/
|
||
10 years ago
|
public class NumVar extends NumMutable {
|
||
10 years ago
|
|
||
|
private double value;
|
||
|
|
||
|
|
||
10 years ago
|
public NumVar(Num value)
|
||
|
{
|
||
10 years ago
|
this(value.value());
|
||
10 years ago
|
}
|
||
|
|
||
|
|
||
10 years ago
|
public NumVar(double value)
|
||
|
{
|
||
10 years ago
|
this.value = value;
|
||
|
}
|
||
|
|
||
|
|
||
|
@Override
|
||
|
public double value()
|
||
|
{
|
||
|
return value;
|
||
|
}
|
||
|
|
||
|
|
||
|
@Override
|
||
10 years ago
|
public void setTo(double value)
|
||
10 years ago
|
{
|
||
|
this.value = value;
|
||
|
}
|
||
|
|
||
|
}
|