mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11:42 +00:00
[wpimath] Fix CoordinateSystem.convert() Transform3d overload (#5532)
This commit is contained in:
@@ -124,7 +124,9 @@ public class CoordinateSystem {
|
||||
*/
|
||||
public static Transform3d convert(
|
||||
Transform3d transform, CoordinateSystem from, CoordinateSystem to) {
|
||||
var coordRot = from.m_rotation.minus(to.m_rotation);
|
||||
return new Transform3d(
|
||||
convert(transform.getTranslation(), from, to), convert(transform.getRotation(), from, to));
|
||||
convert(transform.getTranslation(), from, to),
|
||||
coordRot.unaryMinus().plus(transform.getRotation().rotateBy(coordRot)));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user