H3C HEALPix library for PostgreSQL  (version 1.2)
h3c_math.c File Reference

mathematique functions More...

#include "common.h"
#include "h3c_math.h"
+ Include dependency graph for h3c_math.c:

Go to the source code of this file.

Functions

void h3c_2xyz (double lon, double lat, _h3c_vector vect)
 compute coord in cartesian More...
 
void h3c_2radec (double *in, h3c_coord_t *out)
 cartesian to polar More...
 
void h3c_vect_prod (_h3c_vector v1, _h3c_vector v2, _h3c_vector r)
 vectorial product More...
 
double h3c_scalar_product (_h3c_vector v1, _h3c_vector v2)
 scalar product More...
 
void h3c_normalize (_h3c_vector u)
 normalize in the united vector More...
 
double h3c_vect_length (_h3c_vector v)
 get the length of a vector More...
 
void h3c_unit_vector (double z, double phi, _h3c_vector res)
 create a unit vector from a z coordinate and an azimuthal angle. More...
 

Detailed Description

mathematique functions

Author
G.Landais

Definition in file h3c_math.c.

Function Documentation

◆ h3c_2radec()

void h3c_2radec ( double *  in,
h3c_coord_t *  out 
)

cartesian to polar

Parameters
incartesian coordinates
out(OUT) polar coordinates

Definition at line 53 of file h3c_math.c.

◆ h3c_2xyz()

void h3c_2xyz ( double  lon,
double  lat,
_h3c_vector  vect 
)

compute coord in cartesian

Parameters
lonright ascension (in degree)
latdeclination (in degree)
vect(OUT) cartesian coordinates

Definition at line 39 of file h3c_math.c.

◆ h3c_normalize()

void h3c_normalize ( _h3c_vector  u)

normalize in the united vector

Parameters
uvector

Definition at line 101 of file h3c_math.c.

◆ h3c_scalar_product()

double h3c_scalar_product ( _h3c_vector  v1,
_h3c_vector  v2 
)

scalar product

Parameters
v1vector
v2vector
Returns
the scalar product

Definition at line 92 of file h3c_math.c.

◆ h3c_unit_vector()

void h3c_unit_vector ( double  z,
double  phi,
_h3c_vector  res 
)

create a unit vector from a z coordinate and an azimuthal angle.

Parameters
zcoordinate
phiazimuth
resresult vector (OUT)

Definition at line 125 of file h3c_math.c.

◆ h3c_vect_length()

double h3c_vect_length ( _h3c_vector  v)

get the length of a vector

Parameters
vvector
Returns
the length

Definition at line 114 of file h3c_math.c.

◆ h3c_vect_prod()

void h3c_vect_prod ( _h3c_vector  v1,
_h3c_vector  v2,
_h3c_vector  r 
)

vectorial product

Parameters
v1vector
v2vector
r(OUT) resulting vector

Definition at line 79 of file h3c_math.c.