mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
[wpimath] Java: add static instantiations of common rotations (#6563)
C++ doesn't need this because it supports value types, which are much cheaper to construct. constexpr is also available to make construction zero-cost.
This commit is contained in:
@@ -22,9 +22,9 @@ import edu.wpi.first.math.util.Units;
|
||||
* point toward. This heading reference is profiled for smoothness.
|
||||
*/
|
||||
public class HolonomicDriveController {
|
||||
private Pose2d m_poseError = new Pose2d();
|
||||
private Rotation2d m_rotationError = new Rotation2d();
|
||||
private Pose2d m_poseTolerance = new Pose2d();
|
||||
private Pose2d m_poseError = Pose2d.kZero;
|
||||
private Rotation2d m_rotationError = Rotation2d.kZero;
|
||||
private Pose2d m_poseTolerance = Pose2d.kZero;
|
||||
private boolean m_enabled = true;
|
||||
|
||||
private final PIDController m_xController;
|
||||
|
||||
@@ -37,8 +37,8 @@ public class RamseteController {
|
||||
|
||||
private final double m_zeta;
|
||||
|
||||
private Pose2d m_poseError = new Pose2d();
|
||||
private Pose2d m_poseTolerance = new Pose2d();
|
||||
private Pose2d m_poseError = Pose2d.kZero;
|
||||
private Pose2d m_poseTolerance = Pose2d.kZero;
|
||||
private boolean m_enabled = true;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user