Added copilot test documentation

This commit is contained in:
Pascal Serrarens 2024-12-26 10:55:42 +01:00
parent a7aa679494
commit d3226fddc9

View File

@ -54,6 +54,17 @@ template <typename T> SphericalOf<T> SphericalOf<T>::FromVector3(Vector3 v) {
}
}
/**
* @brief Converts spherical coordinates to a 3D vector.
*
* This function converts the spherical coordinates represented by the
* SphericalOf object to a 3D vector (Vector3). The conversion is based
* on the distance and direction (vertical and horizontal angles) of the
* spherical coordinates.
*
* @tparam T The type of the distance and direction values.
* @return Vector3 The 3D vector representation of the spherical coordinates.
*/
template <typename T> Vector3 SphericalOf<T>::ToVector3() const {
float verticalRad = (pi / 2) - this->direction.vertical.InRadians();
float horizontalRad = this->direction.horizontal.InRadians();