From d3226fddc920c12f32c6ed94ade3e8d42438e03d Mon Sep 17 00:00:00 2001 From: Pascal Serrarens Date: Thu, 26 Dec 2024 10:55:42 +0100 Subject: [PATCH] Added copilot test documentation --- Spherical.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Spherical.cpp b/Spherical.cpp index 671b04c..dbbba17 100644 --- a/Spherical.cpp +++ b/Spherical.cpp @@ -54,6 +54,17 @@ template SphericalOf SphericalOf::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 Vector3 SphericalOf::ToVector3() const { float verticalRad = (pi / 2) - this->direction.vertical.InRadians(); float horizontalRad = this->direction.horizontal.InRadians();