diff --git a/wpimath/src/main/java/edu/wpi/first/math/interpolation/InterpolatingDoubleTreeMap.java b/wpimath/src/main/java/edu/wpi/first/math/interpolation/InterpolatingDoubleTreeMap.java index 15c55d091c..010d232146 100644 --- a/wpimath/src/main/java/edu/wpi/first/math/interpolation/InterpolatingDoubleTreeMap.java +++ b/wpimath/src/main/java/edu/wpi/first/math/interpolation/InterpolatingDoubleTreeMap.java @@ -4,6 +4,8 @@ package edu.wpi.first.math.interpolation; +import java.util.Map; + /** * Interpolating Tree Maps are used to get values at points that are not defined by making a guess * from points that are defined. This uses linear interpolation. @@ -13,4 +15,19 @@ public class InterpolatingDoubleTreeMap extends InterpolatingTreeMap... entries) { + InterpolatingDoubleTreeMap map = new InterpolatingDoubleTreeMap(); + for (var entry : entries) { + map.put(entry.getKey(), entry.getValue()); + } + return map; + } }