@@ -0,0 +1,1022 @@
+package org.usfirst.frc2832.Robot_2016.vision;%0D%0A%0D%0Aimport java.util.NavigableMap;%0D%0Aimport java.util.TreeMap;%0D%0A%0D%0Apublic class InterpolatedLookupTable %7B%0D%0A%09private NavigableMap%3CDouble, Double%3E map;%0D%0A%09%0D%0A%09public InterpolatedLookupTable() %7B%0D%0A%09%09map = new TreeMap%3C%3E();%0D%0A%09%7D%0D%0A%09%0D%0A%09public void put(double key, double value) %7B%0D%0A%09%09map.put(key, value);%0D%0A%09%7D%0D%0A%09%0D%0A%09/**%0D%0A%09 * Gets a value, interpolating linearly%0D%0A%09 * @param key The key, or x-coordinate%0D%0A%09 * @return The value at key, or the analytic expansion of it%0D%0A%09 */%0D%0A%09public double get(double key) %7B%0D%0A%09%09if (map.containsKey(key))%0D%0A%09%09%09return (map.get(key));%0D%0A%09%09%0D%0A%09%09Double keyHigh = map.higherKey(key);%0D%0A%09%09Double keyLow  = map.lowerKey(key);%0D%0A%09%09%0D%0A%09%09if (keyHigh == null)%0D%0A%09%09%09keyHigh = map.lastKey();%0D%0A%09%09if (keyLow == null)%0D%0A%09%09%09keyLow = map.firstKey();%0D%0A%09%09%0D%0A%09%09double valLow = map.get(keyLow);%0D%0A%09%09double valHigh = map.get(keyHigh);%0D%0A%09%09%0D%0A%09%09if (keyHigh == keyLow)%0D%0A%09%09%09return (valLow);%0D%0A%09%09%0D%0A%09%09double t = (key - keyLow) / (keyHigh - keyLow);%0D%0A%09%09return ((1 - t) * valLow + (t) * valHigh);%0D%0A%09%7D%0D%0A%7D%0D%0A

Add amazing lookup table class