Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 22 additions & 5 deletions additional_utilities/AllianceUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,28 @@ public AlliancePose(Translation2d translation, Rotation2d rotation) {
this.pose = new Pose2d(translation, rotation);
}

public AlliancePose(double degrees) {
this.pose = new Pose2d(0, 0, Rotation2d.fromDegrees(degrees));
}

public Pose2d get() {
return toAlliancePose(pose);
}
}}
}

public static class AllianceTranslation {
private final Translation2d translation2d;

public AllianceTranslation(double x, double y) {
this.translation2d = new Translation2d(x, y);
}

public AllianceTranslation() {
this.translation2d = new Translation2d();
}

public AllianceTranslation(Translation2d translation) {
this.translation2d = translation;
}

public Translation2d get() {
return toAlliancePose(translation2d);
Comment on lines +96 to +111
Copy link

Copilot AI Apr 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In AllianceTranslation, the field name translation2d is redundant with the type and inconsistent with AlliancePose's pose field naming. Renaming it to something like translation would improve readability and reduce noise in later usage.

Suggested change
private final Translation2d translation2d;
public AllianceTranslation(double x, double y) {
this.translation2d = new Translation2d(x, y);
}
public AllianceTranslation() {
this.translation2d = new Translation2d();
}
public AllianceTranslation(Translation2d translation) {
this.translation2d = translation;
}
public Translation2d get() {
return toAlliancePose(translation2d);
private final Translation2d translation;
public AllianceTranslation(double x, double y) {
this.translation = new Translation2d(x, y);
}
public AllianceTranslation() {
this.translation = new Translation2d();
}
public AllianceTranslation(Translation2d translation) {
this.translation = translation;
}
public Translation2d get() {
return toAlliancePose(translation);

Copilot uses AI. Check for mistakes.
}
}
}