Skip to content

Commit

Permalink
Add utils from LED class to fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
superpenguin612 committed May 15, 2024
1 parent b21b7e9 commit 580fd8a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/main/java/com/techhounds/houndutil/houndlib/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,12 @@ public static Twist2d toTwist2d(ChassisSpeeds speeds) {
return new Twist2d(
speeds.vxMetersPerSecond, speeds.vyMetersPerSecond, speeds.omegaRadiansPerSecond);
}

public static double interpolate(double start, double end, double t) {
return start + (end - start) * t;
}

public static int interpolate(int start, int end, double t) {
return (int) (start + (end - start) * t);
}
}

0 comments on commit 580fd8a

Please sign in to comment.