diff game/Interpolate.java @ 7:70714c229e23

More work.
author Matti Hamalainen <ccr@tnsp.org>
date Fri, 28 Jan 2011 20:23:21 +0200
parents 44f1e7b47fcf
children 59ff451750fb
line wrap: on
line diff
--- a/game/Interpolate.java	Fri Jan 28 18:42:16 2011 +0200
+++ b/game/Interpolate.java	Fri Jan 28 20:23:21 2011 +0200
@@ -8,19 +8,19 @@
 
 public class Interpolate
 {
-    double start, end, steps;
+    float start, end, steps;
 
-    public Interpolate(double start, double end, double steps)
+    public Interpolate(float start, float end, float steps)
     {
       this.start = start;
       this.end = end;
       this.steps = steps;
     }
     
-    public double getValue(double step)
+    public float getValue(float step)
     {
-      double n = step / steps;
-      double v = n * n * (3.0f - 2.0f * n);
+      float n = step / steps;
+      float v = n * n * (3.0f - 2.0f * n);
       return (start * v) + (end * (1.0f - v));
     }
 }