Package frc.lib.math
Class RotationInterval
java.lang.Object
frc.lib.math.RotationInterval
A one-dimensional range with wrapping on [-pi,pi].
-
Constructor Summary
ConstructorsConstructorDescriptionRotationInterval(Rotation2d min, Rotation2d max) A one-dimensional range with wrapping on [-pi,pi]. -
Method Summary
Modifier and TypeMethodDescriptionstatic RotationIntervalacute(Rotation2d a, Rotation2d b) A one-dimensional range with wrapping on [-pi,pi].Get the interval opposite this.getMax()Get upper extent of the range.getMin()Get lower extent of the range.doublegetOverlap(RotationInterval other) Get length of common subset.booleanoverlaps(RotationInterval other) Get if two intervals share some angles.doublerange()Get distance from min to max.voidsetMax(Rotation2d max) Set upper extent of the range.voidsetMin(Rotation2d min) Set lower extent of the range.
-
Constructor Details
-
RotationInterval
A one-dimensional range with wrapping on [-pi,pi].
-
-
Method Details
-
acute
A one-dimensional range with wrapping on [-pi,pi]. -
complement
Get the interval opposite this. -
range
public double range()Get distance from min to max. -
getMin
Get lower extent of the range. -
setMin
Set lower extent of the range. -
getMax
Get upper extent of the range. -
setMax
Set upper extent of the range. -
overlaps
Get if two intervals share some angles. -
getOverlap
Get length of common subset.
-