mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-24 01:31:46 +00:00
[wpimath] Add scalar multiply and divide operators to all geometry classes (#4438)
Closes #4435.
This commit is contained in:
@@ -112,6 +112,24 @@ class WPILIB_DLLEXPORT Pose3d {
|
||||
*/
|
||||
const Rotation3d& Rotation() const { return m_rotation; }
|
||||
|
||||
/**
|
||||
* Multiplies the current pose by a scalar.
|
||||
*
|
||||
* @param scalar The scalar.
|
||||
*
|
||||
* @return The new scaled Pose2d.
|
||||
*/
|
||||
Pose3d operator*(double scalar) const;
|
||||
|
||||
/**
|
||||
* Divides the current pose by a scalar.
|
||||
*
|
||||
* @param scalar The scalar.
|
||||
*
|
||||
* @return The new scaled Pose2d.
|
||||
*/
|
||||
Pose3d operator/(double scalar) const;
|
||||
|
||||
/**
|
||||
* Transforms the pose by the given transformation and returns the new pose.
|
||||
* See + operator for the matrix multiplication performed.
|
||||
|
||||
Reference in New Issue
Block a user