Package skyview.util
Class LinearScaler
java.lang.Object
skyview.util.Scaler
skyview.util.LinearScaler
Scale an object linearly.
-
Constructor Summary
ConstructorsConstructorDescriptionLinearScaler
(double minVal, double maxVal, int minOutput, int maxOutput) Provide a scaler with a specified scaling range to a specified range of bytes. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
prepareScaling
(double[] c) Set up the scaling.protected final byte
scale
(double val) Scale a single valueMethods inherited from class skyview.util.Scaler
getMaxOutput, getMaxVal, getMinOutput, getMinVal, getUseDefault, scaleArray, setMaxVal, setMinMax, setMinVal
-
Constructor Details
-
LinearScaler
public LinearScaler() -
LinearScaler
public LinearScaler(double minVal, double maxVal, int minOutput, int maxOutput) Provide a scaler with a specified scaling range to a specified range of bytes.
-
-
Method Details
-
prepareScaling
protected void prepareScaling(double[] c) Set up the scaling.- Specified by:
prepareScaling
in classScaler
- Parameters:
c
- The array to be scaled.
-
scale
protected final byte scale(double val) Scale a single value
-