Refactored and reformatted code to use less static variables

This commit is contained in:
CrushedPixel
2015-04-23 14:09:54 +02:00
parent f22416be2c
commit 0003f040ed
109 changed files with 9037 additions and 10229 deletions

View File

@@ -1,22 +1,21 @@
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();
@Override
public Integer getPoint(float position) {
Pair<Float, Pair<Integer, Integer>> pair = getCurrentPoints(position);
if(pair == null) return null;
int first = pair.second().first();
int second = pair.second().second();
float perc = pair.first();
int val = (int)getInterpolatedValue(first, second, perc);
int first = pair.second().first();
int second = pair.second().second();
return val;
}
int val = (int) getInterpolatedValue(first, second, perc);
return val;
}
}