Class MathUtils

java.lang.Object
edu.wpi.first.wpiutil.math.MathUtils

public final class MathUtils
extends java.lang.Object
  • Method Summary

    Modifier and Type Method Description
    static double clamp​(double value, double low, double high)
    Returns value clamped between low and high boundaries.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • clamp

      public static double clamp​(double value, double low, double high)
      Returns value clamped between low and high boundaries.
      Parameters:
      value - Value to clamp.
      low - The lower boundary to which to clamp value.
      high - The higher boundary to which to clamp value.