Package skyview.util

Class LinearScaler

java.lang.Object
skyview.util.Scaler
skyview.util.LinearScaler

public class LinearScaler extends Scaler
Scale an object linearly.
  • 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 class Scaler
      Parameters:
      c - The array to be scaled.
    • scale

      protected final byte scale(double val)
      Scale a single value
      Specified by:
      scale in class Scaler
      Parameters:
      val - The value to be scaled.
      Returns:
      The scaled value.