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