Skip to content
This repository has been archived by the owner on Jul 15, 2024. It is now read-only.

Commit

Permalink
Rename flipAlongX36 to translateAcrossField
Browse files Browse the repository at this point in the history
This was a remnant of last year's code. Renamed & fixed bug so that it works. More understandable now, can be used without racking your brains out.
  • Loading branch information
rowan-mcalpin authored Oct 3, 2023
1 parent 2fc77e1 commit 93f6daf
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ val Double.switchColorAngle get () = (if (color == BLUE) this else 360 - this)
val Double.switchApproachTangentAngle get () = (if (color == BLUE) this else this - 180)
val Double.switchColor get () = (if (color == BLUE) this else this * -1)
val Double.flipAlongX36 get() = (if (color == BLUE) this else 72 - this)
val Double.translateAcrossField get() = (if (color == BLUE) this else (72 - this) * -1)

/** Returns the Vector2d of a Pose2d **/
val Pose2d.v : Vector2d get() = (this.vec())
Expand All @@ -48,4 +49,4 @@ fun Pose2d(matrix: OpenGLMatrix) = Pose2d(
matrix.translation.get(1).toDouble().mmToInches,
Orientation.getOrientation(matrix, AxesReference.EXTRINSIC, AxesOrder.XYZ, AngleUnit.DEGREES)
.thirdAngle.toDouble().toRadians
)
)

0 comments on commit 93f6daf

Please sign in to comment.