mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-23 01:21:42 +00:00
[wpimath] Make Java Quaternion use doubles instead of Vector (#5525)
This avoids allocation overhead on construction. times() was also rewritten to not allocate any temporary objects. Getter calls in the C++ Quaternion class were modified for parity.
This commit is contained in:
@@ -84,7 +84,10 @@ class WPILIB_DLLEXPORT Quaternion {
|
||||
Eigen::Vector3d ToRotationVector() const;
|
||||
|
||||
private:
|
||||
// Scalar r in versor form
|
||||
double m_r = 1.0;
|
||||
|
||||
// Vector v in versor form
|
||||
Eigen::Vector3d m_v{0.0, 0.0, 0.0};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user