First Commit

This commit is contained in:
Marius Metzger
2015-01-03 23:25:21 +01:00
commit cbd96d57f4
64 changed files with 23728 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
package eu.crushedpixel.replaymod.interpolation;
import akka.japi.Pair;
import eu.crushedpixel.replaymod.holders.Position;
public class LinearTimestamp extends LinearInterpolation<Integer> {
@Override
public Integer getPoint(float position) {
Pair<Float, Pair<Integer, Integer>> pair = getCurrentPoints(position);
if(pair == null) return null;
float perc = pair.first();
int first = pair.second().first();
int second = pair.second().second();
int val = (int)getInterpolatedValue(first, second, perc);
return val;
}
}