Convertions


Functions

void vect2_pol2cart (vect2_pol *vp, vect2_cart *vc)
 Convert a polar vector to a cartesian one.
void vect2_cart2pol (vect2_cart *vc, vect2_pol *vp)
 Convert a cartesian vector to a polar one.

Detailed Description

This functions allow to convert between the 2 vector types.

Function Documentation

void vect2_cart2pol ( vect2_cart vc,
vect2_pol vp 
)

Convert a cartesian vector to a polar one.

Parameters:
vc reference to target cartesian vector to convert from.
vp reference to target polar vector where the function write the result.
Warning:
This function doesn't do any malloc ! You have to allocate structures before calling this function.

Definition at line 19 of file vect2.c.

References _vect2_pol::r, _vect2_pol::theta, _vect2_cart::x, and _vect2_cart::y.

Referenced by trajectory_goto_xy_rel(), vect2_add_pol(), and vect2_sub_pol().

void vect2_pol2cart ( vect2_pol vp,
vect2_cart vc 
)

Convert a polar vector to a cartesian one.

Parameters:
vp reference to target polar vector to convert from.
vc reference to target cartesian vector where the function write.
Warning:
This function doesn't do any malloc ! You have to allocate structures before calling this function.

Definition at line 7 of file vect2.c.

References _vect2_pol::r, _vect2_pol::theta, _vect2_cart::x, and _vect2_cart::y.

Referenced by trajectory_goto_d_a_rel(), trajectory_goto_xy_rel(), vect2_add_pol(), and vect2_sub_pol().


Generated on Fri Mar 12 06:32:07 2010 for AVR by  doxygen 1.5.6