#includeIn this example, we define an AABB with minimum and maximum coordinates and calculate the center of the AABB by using the GetAABBCenter function. We then print out the resulting center point. The package library used in this example is glm, a header-only C++ mathematics library for graphics software based on the OpenGL Shading Language (GLSL) specifications.#include glm::vec3 GetAABBCenter(glm::vec3 min, glm::vec3 max) { glm::vec3 center; center.x = (min.x + max.x) / 2.0f; center.y = (min.y + max.y) / 2.0f; center.z = (min.z + max.z) / 2.0f; return center; } int main() { glm::vec3 min(-1.0f, -1.0f, -1.0f); glm::vec3 max(1.0f, 1.0f, 1.0f); glm::vec3 center = GetAABBCenter(min, max); std::cout << "AABB center: (" << center.x << ", " << center.y << ", " << center.z << ")" << std::endl; return 0; }