001package tagalong.math;
002
003import edu.wpi.first.math.geometry.Pose2d;
004
005/**
006 * Utility functions for interacting with WPI Lib classes
007 */
008public class WpilibUtils {
009  /**
010   * Converts Pose 2d into an array
011   *
012   * @param pose Pose2d
013   * @param arr  Array to set with Pose2d values
014   */
015  public static void poseToArray(Pose2d pose, double[] arr) {
016    arr[0] = pose.getX();
017    arr[1] = pose.getY();
018    arr[2] = pose.getRotation().getDegrees();
019  }
020}