Class Pointd

java.lang.Object
  extended byPointd

public class Pointd
extends java.lang.Object

Class Pointd is used to represent 2D points.


Field Summary
 double x
          The X value.
 double y
          The Y value.
 
Constructor Summary
Pointd()
          Creates a new Pointd instance, initialized to (0,0).
Pointd(double x, double y)
          Creates a new Pointd instance.
 
Method Summary
 double getX()
          Return the X value.
 double getY()
          Return the Y value.
 java.lang.String toString()
          Print the (x,y) values as a string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

x

public double x
The X value.


y

public double y
The Y value.

Constructor Detail

Pointd

public Pointd(double x,
              double y)
Creates a new Pointd instance.

Parameters:
x - a double value
y - a double value

Pointd

public Pointd()
Creates a new Pointd instance, initialized to (0,0).

Method Detail

getX

public double getX()
Return the X value.

Returns:
a double value

getY

public double getY()
Return the Y value.

Returns:
a double value

toString

public java.lang.String toString()
Print the (x,y) values as a string.

Returns:
a String value