Class MathUtils

java.lang.Object
xbot.common.math.MathUtils

public class MathUtils extends Object
  • Field Details

    • Tau

      public static double Tau
  • Constructor Details

    • MathUtils

      public MathUtils()
  • Method Details

    • constrainDouble

      public static double constrainDouble(double value, double lowerBound, double upperBound)
    • constrainInt

      public static int constrainInt(int value, int lowerBound, int upperBound)
    • scaleDouble

      public static double scaleDouble(double value, double oldMin, double oldMax, double newMin, double newMax)
    • constrainDoubleToRobotScale

      public static double constrainDoubleToRobotScale(double value)
    • squareAndRetainSign

      public static double squareAndRetainSign(double value)
    • exponentAndRetainSign

      public static double exponentAndRetainSign(double value, int exponent)
    • deadband

      public static double deadband(double input, double deadband)
    • deadband

      public static double deadband(double input, double deadband, Function<Double,Double> function)