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 RotationInterval
acute
(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.double
getOverlap
(RotationInterval other) Get length of common subset.boolean
overlaps
(RotationInterval other) Get if two intervals share some angles.double
range()
Get distance from min to max.void
setMax
(Rotation2d max) Set upper extent of the range.void
setMin
(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.
-