2024-09-20 00:57:41 -06:00
|
|
|
#ifndef COORDINATE_CONVERSION_H
|
|
|
|
#define COORDINATE_CONVERSION_H
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Converts passed polar coordinates to their cartesian equivalent, using
|
|
|
|
* pass-by-pointer
|
|
|
|
*
|
2024-09-20 19:40:46 -06:00
|
|
|
* @param RADIUS The radius of the polar coordinates
|
|
|
|
* @param ANGLE The angle of the polar coordinates
|
2024-09-22 20:23:56 -06:00
|
|
|
* @param pXCoordinate A pointer referencing the variable to place the x
|
|
|
|
* component of the cartesian coordinates into
|
|
|
|
* @param pYCoordinate A pointer referencing the variable to place the y
|
|
|
|
* component of the cartesian coordinates into
|
2024-09-20 00:57:41 -06:00
|
|
|
*/
|
2024-09-22 20:23:56 -06:00
|
|
|
void polar_to_cartesian(const double RADIUS, const double ANGLE,
|
|
|
|
double* pXCoordinate, double* pYCoordinate);
|
2024-09-20 00:57:41 -06:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Converts passed cartesian coordinates to their polar equivalent, using
|
|
|
|
* pass-by-pointer
|
|
|
|
*
|
2024-09-20 19:40:46 -06:00
|
|
|
* @param X_COORDINATE The x component of the cartesian coordinates
|
|
|
|
* @param Y_COORDINATE The y component of the cartesian coordinates
|
2024-09-22 20:23:56 -06:00
|
|
|
* @param pRadius A pointer referencing the variable to put the radius of the
|
|
|
|
* polar coordinates into
|
|
|
|
* @param pAngle A pointer referencing the variable to put the angle of the
|
|
|
|
* polar coordinates into
|
2024-09-20 00:57:41 -06:00
|
|
|
*/
|
2024-09-22 20:23:56 -06:00
|
|
|
void cartesian_to_polar(const double X_COORDINATE, const double Y_COORDINATE,
|
|
|
|
double* pRadius, double* pAngle);
|
2024-09-20 00:57:41 -06:00
|
|
|
|
|
|
|
#endif // COORDINATE_CONVERSION_H
|