Updated YAGSL to support CANandEncoders.

This commit is contained in:
thenetworkgrinch
2023-08-09 13:15:02 -05:00
parent b18491fa9c
commit d356dec4d0
10 changed files with 277 additions and 77 deletions

View File

@@ -89,7 +89,7 @@ public class SwerveMath
public static double calculateMaxAngularVelocity(
double maxSpeed, double furthestModuleX, double furthestModuleY)
{
return maxSpeed / Math.hypot(furthestModuleX, furthestModuleY);
return maxSpeed / new Rotation2d(furthestModuleX, furthestModuleY).getRadians();
}
/**