Package com.io7m.jcamera

# Class JCameraSignallingClamp

java.lang.Object
com.io7m.jcamera.JCameraSignallingClamp

@EqualityReference public final class JCameraSignallingClamp extends Object
A "signalling" clamp operation. That is, a function that can clamp a value to a given inclusive range and sets a flag to indicate whether or not the original value was actually outside of the range.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `JCameraSignallingClamp()`
  Construct a new signalling clamp function.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `clamp(double x, double min, double max)`
  Clamp the value `x` to the given inclusive range `[min, max]`.
  `double`
  `getValue()`
  `boolean`
  `isClamped()`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### JCameraSignallingClamp

    public JCameraSignallingClamp()
    Construct a new signalling clamp function.

- ## Method Details

  - ### clamp

    public void clamp(double x, double min, double max)
    Clamp the value `x` to the given inclusive range `[min, max]`.
    Parameters:
      `x` - The value
      `min` - The minimum value
      `max` - The maximum value

  - ### getValue

    public double getValue()
    Returns:
      The value resulting from the most recent clamp operation.

  - ### isClamped

    public boolean isClamped()
    Returns:
      `true` if the value passed to the most recent clamp operation was not in the inclusive range.