v0.3.0: fixed a bug with new ballistica system

(somehow I always get Math.min & Math.max mixed up)
This commit is contained in:
Evan Debenham 2015-04-03 22:07:30 -04:00
parent 06f747da8d
commit 80c591e64a

View File

@ -135,7 +135,7 @@ public class Ballistica {
//if there is an error, returns an empty arraylist instead.
public List<Integer> subPath(int start, int end){
try {
end = Math.max( end, path.size()-1);
end = Math.min( end, path.size()-1);
return path.subList(start, end+1);
} catch (Exception e){
return new ArrayList<>();