mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-05 03:21:42 +00:00
[wpimath] Add nearest() method to Pose3d (mirroring Pose2d) (#8010)
This commit is contained in:
@@ -242,7 +242,11 @@ class WPILIB_DLLEXPORT Pose2d {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the nearest Pose2d from a collection of poses
|
||||
* Returns the nearest Pose2d from a collection of poses.
|
||||
*
|
||||
* If two or more poses in the collection have the same distance from this
|
||||
* pose, return the one with the closest rotation component.
|
||||
*
|
||||
* @param poses The collection of poses.
|
||||
* @return The nearest Pose2d from the collection.
|
||||
*/
|
||||
@@ -264,7 +268,11 @@ class WPILIB_DLLEXPORT Pose2d {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the nearest Pose2d from a collection of poses
|
||||
* Returns the nearest Pose2d from a collection of poses.
|
||||
*
|
||||
* If two or more poses in the collection have the same distance from this
|
||||
* pose, return the one with the closest rotation component.
|
||||
*
|
||||
* @param poses The collection of poses.
|
||||
* @return The nearest Pose2d from the collection.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user