public class Vector extends Object
[ x ] [ y ] [ z ]
Constructor and Description |
---|
Vector()
Constructs a Vector object
|
Vector(double x,
double y,
double z)
Constructs a Vector object with values (x,y,z)
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
Tests the specified object
obj for equality with this vector |
double |
getX()
Returns the x coordinate of this vector
|
double |
getY()
Returns the y coordinate of this vector
|
double |
getZ()
Returns the z coordinate of this vector
|
int |
hashCode() |
void |
setX(double x)
Sets the x coordinate of this vector
|
void |
setY(double y)
Sets the y coordinate of this vector
|
void |
setZ(double z)
Sets the z coordinate of this vector
|
String |
toString()
Returns the vector elements as a String
|
public Vector()
public Vector(double x, double y, double z)
x
- the x coordinatey
- the y coordinatez
- the z coordinatepublic double getX()
public void setX(double x)
x
- the x coordinatepublic double getY()
public void setY(double y)
y
- the y coordinatepublic double getZ()
public void setZ(double z)
z
- the z coordinatepublic boolean equals(Object obj)
obj
for equality with this vectorCopyright © 2009-2013. All Rights Reserved.