Upgrading to 2025.1.0

This commit is contained in:
thenetworkgrinch
2024-12-09 23:26:04 +00:00
parent 9fe6551d88
commit 4bc6978a20
35 changed files with 1902 additions and 1122 deletions

View File

@@ -411,6 +411,10 @@ public class SwerveMath
*/
public static Translation2d scaleTranslation(Translation2d translation, double scalar)
{
if (Math.hypot(translation.getX(), translation.getY()) <= 1.0E-6)
{
return translation;
}
return new Translation2d(translation.getNorm() * scalar, translation.getAngle());
}
}