uavsim.datatypes
Class ScalerPair

java.lang.Object
  extended by uavsim.datatypes.ScalerPair

public class ScalerPair
extends java.lang.Object

Defines a pair of scalers, which is useful to encapsulate a lower and upper relative bound.

Author:
Dan Tappan [26.06.11]

Field Summary
private  Scaler _scaler1
          the first scaler
private  Scaler _scaler2
          the second scaler
 
Constructor Summary
ScalerPair(double scale1, double scale2)
          Creates a scaler pair.
ScalerPair(Scaler scaler1, Scaler scaler2)
          Creates a scaler pair.
 
Method Summary
 Scaler getAspectRatio()
          Determines the ratio between the first and second scaler by dividing the former by the latter.
 Scaler getScaler1()
          Gets the first scaler.
 Scaler getScaler2()
          Gets the second scaler.
private  void setScalerPair(Scaler scaler1, Scaler scaler2)
          Sets the scalers.
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_scaler1

private Scaler _scaler1
the first scaler


_scaler2

private Scaler _scaler2
the second scaler

Constructor Detail

ScalerPair

public ScalerPair(double scale1,
                  double scale2)
Creates a scaler pair. There is no constraint on either scale being larger.

Parameters:
scale1 - - the first scale
scale2 - - the second scale

ScalerPair

public ScalerPair(Scaler scaler1,
                  Scaler scaler2)
Creates a scaler pair. There is no constraint on either scaler being larger.

Parameters:
scaler1 - - the first scaler
scaler2 - - the second scaler
Method Detail

getAspectRatio

public Scaler getAspectRatio()
Determines the ratio between the first and second scaler by dividing the former by the latter.

Returns:
the ratio

getScaler1

public Scaler getScaler1()
Gets the first scaler.

Returns:
the scaler

getScaler2

public Scaler getScaler2()
Gets the second scaler.

Returns:
the scaler

setScalerPair

private void setScalerPair(Scaler scaler1,
                           Scaler scaler2)
Sets the scalers.

Parameters:
scaler1 - - the first scaler
scaler2 - - the second scaler

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object