Package com.acmerobotics.roadrunner
Class Math
-
- All Implemented Interfaces:
public final class Math
-
-
Method Summary
Modifier and Type Method Description final static Doublesnz(Double x)final static Doubleclamp(Double x, Double lo, Double hi)final static List<Double>range(Double begin, Double end, Integer samples)final static List<Double>rangeCentered(Double begin, Double end, Integer samples)final static Doublelerp(Double x, Double fromLo, Double fromHi, Double toLo, Double toHi)final static IntegralScanResultintegralScan(Double a, Double b, Double eps, Function1<Double, Double> f)final static DoublelerpLookup(List<Double> source, List<Double> target, Double query)final static List<Double>lerpLookupMap(List<Double> source, List<Double> target, List<Double> queries)
-
-
-
Method Detail
-
range
final static List<Double> range(Double begin, Double end, Integer samples)
- Parameters:
begin- \(a\)end- \(b\)samples- \(n\)
-
rangeCentered
final static List<Double> rangeCentered(Double begin, Double end, Integer samples)
- Parameters:
begin- \(a\)end- \(b\)samples- \(n\)
-
integralScan
final static IntegralScanResult integralScan(Double a, Double b, Double eps, Function1<Double, Double> f)
- Parameters:
a- \(a\)b- \(b\)eps- desired error in the length approximation \(g(b)\)f- \(f(x)\)
-
-