sdr 0.7

net.cscott.sdr.util
Class Point

java.lang.Object
  extended by net.cscott.sdr.util.Point

public class Point
extends Object

A 2D point, where x and y coordinate are Fractions.


Field Summary
 Fraction x
           
 Fraction y
           
static Point ZERO
           
 
Constructor Summary
Point(Fraction x, Fraction y)
           
 
Method Summary
 Point add(Point p)
           
 boolean equals(Object o)
           
 int hashCode()
           
 Point multiply(Fraction f)
           
 Point subtract(Point p)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

ZERO

public static final Point ZERO

x

public final Fraction x

y

public final Fraction y
Constructor Detail

Point

public Point(Fraction x,
             Fraction y)
Method Detail

add

public Point add(Point p)

subtract

public Point subtract(Point p)

multiply

public Point multiply(Fraction f)

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object

sdr 0.7

Copyright © 2006-2009 C. Scott Ananian