public class Point extends Object
| Constructor and Description |
|---|
Point(double x,
double y) |
| Modifier and Type | Method and Description |
|---|---|
double |
distance(Point p2)
Distance between two points
|
boolean |
equals(Object obj) |
double |
getX() |
double |
getY() |
int |
hashCode() |
Point |
scale(double s)
Scale the point
|
Point |
subtract(Point p2)
Gets a new point that is the diference between two points
|
String |
toString() |
public double distance(Point p2)
p2 - the other pointpublic Point subtract(Point p2)
p2 - the other pointpublic Point scale(double s)
s - is the scalepublic double getX()
public double getY()
Copyright © 2017. All rights reserved.