public class Point
extends java.lang.Object
Constructor and Description |
---|
Point() |
Point(double x,
double y) |
Point(Point c) |
Modifier and Type | Method and Description |
---|---|
Point |
div(Point c)
Divide this point
Point by specified point and return the result. |
boolean |
equals(java.lang.Object obj) |
double |
getX()
Get the x value of the point.
|
double |
getY()
Get the y value of the point.
|
int |
hashCode() |
Point |
minus(Point c)
Subtract the specified
Point from this point and return the result. |
Point |
mult(Point c)
Multiple this point
Point by specified point and return the result. |
Point |
plus(Point c)
Add the specified
Point to this point and return the result. |
java.lang.String |
toString() |
public Point()
public Point(double x, double y)
public Point(Point c)
public Point div(Point c)
c
- the value by which to dividepublic boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public double getX()
public double getY()
public int hashCode()
hashCode
in class java.lang.Object
public Point minus(Point c)
c
- the value to subtractpublic Point mult(Point c)
c
- the value by which to multiplypublic java.lang.String toString()
toString
in class java.lang.Object