Class Conversion

java.lang.Object
com.thethriftybot.util.Conversion

public final class Conversion extends Object
Utility class for converting between different units.
  • Constructor Details

  • Method Details

    • toMotor

      public double toMotor(double value)
      Takes in a value of units given in the constructor and returns rotations.
      Parameters:
      value - Value of units given in the constructor
      Returns:
      Number of motor rotations
    • fromMotor

      public double fromMotor(double rotations)
      Takes in a number of rotations and returns the value of units given in the constructor.
      Parameters:
      rotations - Number of motor rotations
      Returns:
      Value of units given in the constructor