|
|||||||||||||||||||
healpix.tools
|
Constructor Summary | |
---|---|
SpatialVector()
Default constructor constructs (1,0,0), ra=0, dec=0. |
|
SpatialVector(double ra,
double dec)
Construct from ra/dec in degrees |
|
SpatialVector(double x1,
double y1,
double z1)
Constructor from three coordinates |
|
SpatialVector(SpatialVector copy)
Copy constructor - be aware this only copies x,y,z |
Method Summary | |
---|---|
SpatialVector |
add(SpatialVector v)
vector addition |
double |
angle(SpatialVector v1)
Returns the angle in radians between this vector and the vector parameter; the return value is constrained to the range [0,PI]. |
SpatialVector |
cross(SpatialVector v)
vector cross product |
double |
dec()
Get the dec angle in degrees |
double |
dot(SpatialVector v1)
Computes the dot product of the this vector and vector v1. |
boolean |
equal(SpatialVector v)
Compare vectors if coordinates are equals |
boolean |
equals(Object obj)
|
double[] |
get()
Get the coordinates in a 3 elements 1D array |
int |
hashCode()
|
double |
length()
Returns the length of this vector. |
double |
lengthSquared()
Returns the squared length of this vector. |
SpatialVector |
mul(double n)
multiply with a number |
void |
normalized()
Normalized this vector |
double |
ra()
Get the ra angle in degrees |
void |
set(double ra,
double dec)
Sets the ra and dec angles in degrees |
SpatialVector |
sub(SpatialVector v)
vector subtraction |
double |
toDe()
|
double |
toRa()
|
String |
toString()
|
double |
x()
|
double |
y()
|
double |
z()
|
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SpatialVector()
public SpatialVector(double x1, double y1, double z1)
x1
- y1
- z1
- public SpatialVector(double ra, double dec)
ra
- RA in degreesdec
- DEC in degreespublic SpatialVector(SpatialVector copy)
copy
- the vector to copyMethod Detail |
---|
public final double length()
public final double lengthSquared()
public void normalized()
public void set(double ra, double dec)
ra
- right ascension angle in degreesdec
- declination angle in degreespublic final double angle(SpatialVector v1)
v1
- the other vector
public double[] get()
public double x()
public double y()
public double z()
public String toString()
public SpatialVector cross(SpatialVector v)
v
- the vector to cross
public boolean equal(SpatialVector v)
v
- the vector to be compared with
public boolean equals(Object obj)
public int hashCode()
public SpatialVector mul(double n)
n
- the scale number to be multiply to the coordinates x,y,z
public final double dot(SpatialVector v1)
v1
- the other vector
public SpatialVector add(SpatialVector v)
v
- the vector to be added
public SpatialVector sub(SpatialVector v)
v
- the vector to be substracted
public double dec()
public double ra()
public double toRa()
public double toDe()
|
"Built from revision exported" | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
|
||||||
|
||||||