com.uppaal.model.io2
Class FloatPoint

java.lang.Object
  extended by java.awt.geom.Point2D
      extended by java.awt.geom.Point2D.Float
          extended by com.uppaal.model.io2.FloatPoint
All Implemented Interfaces:
Serializable, Cloneable

public class FloatPoint
extends Point2D.Float

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.awt.geom.Point2D
Point2D.Double, Point2D.Float
 
Field Summary
 
Fields inherited from class java.awt.geom.Point2D.Float
x, y
 
Constructor Summary
FloatPoint(float x, float y)
          Creates a point from given coordinates
FloatPoint(Point2D point)
           
 
Method Summary
 FloatPoint add(FloatPoint add)
          Returns a point with this point's coordinates added with the given point.
 FloatPoint add(int addX, int addY)
          Returns a point with this point's coordinates added with the given coordinates.
 IntPoint getIntPoint()
          Returns an integer rounded version of this point
 float length()
          Returns the length of this point's vector
 FloatPoint multiply(float mult)
          Returns a point which is a multiplication of this point
 FloatPoint rotate(double radAngle)
          Returns this point's vector rotated according to the radian angle
 FloatPoint subtract(float subX, float subY)
          Returns a point with this point's coordinates subtracted by the given coordinates.
 FloatPoint subtract(FloatPoint sub)
          Returns a point with this point's coordinates subtracted by the given point.
 String toString()
          Returns a string representation of this object
 FloatPoint unitVector()
          Returns the unit vector for this point's vector
 
Methods inherited from class java.awt.geom.Point2D.Float
getX, getY, setLocation, setLocation
 
Methods inherited from class java.awt.geom.Point2D
clone, distance, distance, distance, distanceSq, distanceSq, distanceSq, equals, hashCode, setLocation
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FloatPoint

public FloatPoint(float x,
                  float y)
Creates a point from given coordinates


FloatPoint

public FloatPoint(Point2D point)
Method Detail

subtract

public FloatPoint subtract(float subX,
                           float subY)
Returns a point with this point's coordinates subtracted by the given coordinates.


subtract

public FloatPoint subtract(FloatPoint sub)
Returns a point with this point's coordinates subtracted by the given point.


add

public FloatPoint add(int addX,
                      int addY)
Returns a point with this point's coordinates added with the given coordinates.


add

public FloatPoint add(FloatPoint add)
Returns a point with this point's coordinates added with the given point.


multiply

public FloatPoint multiply(float mult)
Returns a point which is a multiplication of this point


getIntPoint

public IntPoint getIntPoint()
Returns an integer rounded version of this point


length

public float length()
Returns the length of this point's vector


unitVector

public FloatPoint unitVector()
Returns the unit vector for this point's vector


rotate

public FloatPoint rotate(double radAngle)
Returns this point's vector rotated according to the radian angle


toString

public String toString()
Returns a string representation of this object

Overrides:
toString in class Point2D.Float


Copyright © 2012 Uppsala University and Aalborg University. All Rights Reserved.