Skip to content

Commit

Permalink
moar lint
Browse files Browse the repository at this point in the history
  • Loading branch information
dejabot committed Nov 23, 2023
1 parent 667deb6 commit 5bace98
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/com/team766/robot/mechanisms/EncoderUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ public static double wristRotationsToDegrees(double rotations) {
*/
public static double elevatorHeightToRotations(double height) {
// height * net gear ratio * (rotations / height)
return height * (36./12.) * (1. / (1.641 * Math.PI));
return height * (36. / 12.) * (1. / (1.641 * Math.PI));
}

/**
* Converts the elevator motor's rotations to a height (in inches).
*/
public static double elevatorRotationsToHeight(double rotations) {
// rotations * net gear ratio * (height / rotations)
return rotations * (12./36.) * ((1.641 * Math.PI) / 1.);
return rotations * (12. / 36.) * ((1.641 * Math.PI) / 1.);
}

/**
Expand All @@ -68,7 +68,7 @@ public static double shoulderRotationsToDegrees(double rotations) {
* @return
*/
public static double lawOfCosines(double side1, double side2, double angle) {
double side3Squared = (Math.pow(side1, 2.0) + Math.pow(side2, 2.0) - 2*side1*side2*Math.cos(Math.toRadians(angle)));
double side3Squared = (Math.pow(side1, 2.0) + Math.pow(side2, 2.0) - (2 * side1 * side2 * Math.cos(Math.toRadians(angle))));
return Math.sqrt(side3Squared);
}

Expand Down

0 comments on commit 5bace98

Please sign in to comment.