edu.berkeley.guir.lib.awt.geom
Class LinearInterpolation
java.lang.Object
|
+--edu.berkeley.guir.lib.awt.geom.Interpolation
|
+--edu.berkeley.guir.lib.awt.geom.LinearInterpolation
- public class LinearInterpolation
- extends Interpolation
Linearly interpolate between two values.
This software is distributed under the
Berkeley Software License.
Revisions: - GUIRLib-v1.3-1.0.0, Aug 03 1999, JH
Created class
- GUIRLib-v1.4-1.0.0, Aug 31 2000, JH
Touched for GUIRLib release
- Since:
- JDK 1.2.2
- Version:
- GUIRLib-v1.4-1.0.0, Aug 31 2000
- Author:
- Jason Hong (
jasonh@cs.berkeley.edu )
Method Summary |
double |
interpolate(double startValue,
double endValue,
int current,
int total)
Defines a function that can interpolate between two values. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LinearInterpolation
public LinearInterpolation()
interpolate
public double interpolate(double startValue,
double endValue,
int current,
int total)
- Description copied from class:
Interpolation
- Defines a function that can interpolate between two values. It should be
used like so:
for (int i = 0; i < total; i++) {
interpolate(0, 1, i, total);
}
- Overrides:
interpolate
in class Interpolation
- Following copied from class:
edu.berkeley.guir.lib.awt.geom.Interpolation
- Parameters:
startValue
- is our lower bound value.endValue
- is our goal value.current
- is the current step we are on (0 based).total
- is the total number of steps to take.