Skip to content
This repository was archived by the owner on Jan 10, 2025. It is now read-only.

Commit b0b1452

Browse files
committed
multiply number
1 parent b9a38d0 commit b0b1452

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/java/frc/robot/swerve/SwerveSubsystem.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,12 +237,12 @@ public void driveTeleop(double x, double y, double theta) {
237237
DogLog.log("Swerve/polartheta", polarTheta);
238238

239239
// polar -> xytheta
240-
double polarX = (r * Math.cos(polarTheta) * );
241-
double polarY = (r * Math.sin(polarTheta));
240+
double polarX = (r * Math.cos(polarTheta) * Math.sqrt(Math.pow(Math.sin(polarTheta), 2) + 1));
241+
double polarY = (r * Math.sin(polarTheta) * Math.sqrt(Math.pow(Math.sin(polarTheta), 2) + 1));
242242
DogLog.log("Swerve/polarx", polarX);
243243
DogLog.log("Swerve/polary", polarY);
244244
}
245-
245+
246246
// xytheta -> swerve
247247
teleopSpeeds =
248248
new ChassisSpeeds(

0 commit comments

Comments
 (0)