com.swfm.mica.core
Class MiScale

java.lang.Object
  extended bycom.swfm.mica.core.MiScale

public class MiScale
extends java.lang.Object

Version:
%I% %G%
Author:
Michael L. Davis

Field Summary
static MiScale identity
           
 double x
           
 double y
           
 
Constructor Summary
MiScale()
          Constructs a new MiScale.
MiScale(double x, double y)
          Constructs a new MiScale.
MiScale(MiScale other)
          Constructs a new MiScale that is a copy of the given scale.
 
Method Summary
 void combine(MiScale other)
          Combines (multiplies) the components of the given scale with this.
 void copy(MiScale other)
          Copies the components of the given scale.
 boolean equals(MiScale other)
          Returns whether this equals the given scale.
 MiScale inverseOf()
          Returns a copy of this scale that is the inverse of this one.
 boolean isIdentity()
          Return whether the components of this scale are equal to one.
 void set(double sx, double sy)
          Set the components of this scale to the given values.
 void setIsIdentity()
          Set the components of this scale to one.
 java.lang.String toString()
          Return text that describes this vector.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

identity

public static final MiScale identity

x

public double x

y

public double y
Constructor Detail

MiScale

public MiScale()
Constructs a new MiScale.


MiScale

public MiScale(MiScale other)
Constructs a new MiScale that is a copy of the given scale.

Parameters:
other - the scale to copy

MiScale

public MiScale(double x,
               double y)
Constructs a new MiScale.

Parameters:
x - the x component
y - the y component
Method Detail

set

public void set(double sx,
                double sy)
Set the components of this scale to the given values.

Parameters:
sx - the x component
sy - the y component

copy

public void copy(MiScale other)
Copies the components of the given scale.

Parameters:
other - the scale to copy

combine

public void combine(MiScale other)
Combines (multiplies) the components of the given scale with this.

Parameters:
other - the scale to combine with this one

equals

public boolean equals(MiScale other)
Returns whether this equals the given scale.

Parameters:
other - the scale to compare this with
Returns:
true if they are equal

setIsIdentity

public void setIsIdentity()
Set the components of this scale to one.


isIdentity

public boolean isIdentity()
Return whether the components of this scale are equal to one.

Returns:
true if all components of this scale are equal to one.

inverseOf

public MiScale inverseOf()
Returns a copy of this scale that is the inverse of this one. Each component of the returned scale equals 1/component of this scale.

Returns:
the inversed copy of this scale.

toString

public java.lang.String toString()
Return text that describes this vector.