Package com.io7m.jcamera
Class JCameraSignallingClamp
java.lang.Object
com.io7m.jcamera.JCameraSignallingClamp
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 -
Method Summary
-
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 valuexto the given inclusive range[min, max].- Parameters:
x- The valuemin- The minimum valuemax- The maximum value
-
getValue
public double getValue()- Returns:
- The value resulting from the most recent clamp operation.
-
isClamped
public boolean isClamped()- Returns:
trueif the value passed to the most recent clamp operation was not in the inclusive range.
-