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:
parent
06f747da8d
commit
80c591e64a
|
@ -135,7 +135,7 @@ public class Ballistica {
|
||||||
//if there is an error, returns an empty arraylist instead.
|
//if there is an error, returns an empty arraylist instead.
|
||||||
public List<Integer> subPath(int start, int end){
|
public List<Integer> subPath(int start, int end){
|
||||||
try {
|
try {
|
||||||
end = Math.max( end, path.size()-1);
|
end = Math.min( end, path.size()-1);
|
||||||
return path.subList(start, end+1);
|
return path.subList(start, end+1);
|
||||||
} catch (Exception e){
|
} catch (Exception e){
|
||||||
return new ArrayList<>();
|
return new ArrayList<>();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user