mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
[wpimath] Document example usage for InterpolatingDoubleTreeMap (NFC) (#6456)
This commit is contained in:
@@ -9,6 +9,17 @@ 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.
|
||||
*
|
||||
* <p>Example of use:
|
||||
*
|
||||
* <pre><code>
|
||||
* InterpolatingDoubleTreeMap table = new InterpolatingDoubleTreeMap();
|
||||
* table.put(0.0, 0.0);
|
||||
* table.put(1.0, 10.0);
|
||||
* table.put(2.0, 30.0);
|
||||
* // ...
|
||||
* double result = table.get(1.5); // Returns 20.0
|
||||
* </code></pre>
|
||||
*/
|
||||
public class InterpolatingDoubleTreeMap extends InterpolatingTreeMap<Double, Double> {
|
||||
/** Default constructor. */
|
||||
|
||||
Reference in New Issue
Block a user