java.lang.Object
com.stuypulse.stuylib.streams.vectors.filters.VClamp
All Implemented Interfaces:
VFilter

public class VClamp extends Object implements VFilter
A filter that clamps the magnitude of a vector to a certain size
  • Constructor Details

    • VClamp

      public VClamp(Number maxMagnitude)
  • Method Details

    • get

      public Vector2D get(Vector2D target)
      Description copied from interface: VFilter
      Get next value in Filter based on the next value given
      Specified by:
      get in interface VFilter
      Parameters:
      target - next input value in the stream
      Returns:
      the output value of the filter