mirror of
https://github.com/BroncBotz3481/YAGSL
synced 2026-06-19 06:21:40 +00:00
Updated YAGSL to support CANandEncoders.
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user