Normand Briere
2016-02-27 28ab4dad99d24372ea58b09a00eafbce1291c278
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package aurelienribon.tweenengine.primitives;
 
import aurelienribon.tweenengine.TweenAccessor;
 
/**
 * @author Aurelien Ribon | http://www.aurelienribon.com/
 */
public class MutableFloat extends Number implements TweenAccessor<MutableFloat> {
   private float value;
 
   public MutableFloat(float value) {
       this.value = value;
   }
 
   public void setValue(float value) {
       this.value = value;
   }
 
   @Override public int intValue() {return (int) value;}
   @Override public long longValue() {return (long) value;}
   @Override public float floatValue() {return (float) value;}
   @Override public double doubleValue() {return (double) value;}
 
   @Override
   public int getValues(MutableFloat target, int tweenType, float[] returnValues) {
       returnValues[0] = target.value;
       return 1;
   }
 
   @Override
   public void setValues(MutableFloat target, int tweenType, float[] newValues) {
       target.value = newValues[0];
   }
}