Package com.acmerobotics.roadrunner
Class Math
-
- All Implemented Interfaces:
public final class Math
-
-
Method Summary
Modifier and Type Method Description final static Double
snz(Double x)
final static Double
clamp(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 Double
lerp(Double x, Double fromLo, Double fromHi, Double toLo, Double toHi)
final static IntegralScanResult
integralScan(Double a, Double b, Double eps, Function1<Double, Double> f)
final static Double
lerpLookup(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)\)
-
-
-
-