From: Mikko Rasa Date: Sun, 26 Jan 2025 16:53:25 +0000 (+0200) Subject: Add a Sphere convenience class X-Git-Url: https://git.tdb.fi/?a=commitdiff_plain;h=5209f81cc7b1503a2e42cfb7416e8622515da3be;p=libs%2Fmath.git Add a Sphere convenience class For some reason this was missing even though there's Rectangle, Box and Circle. --- diff --git a/source/geometry/sphere.h b/source/geometry/sphere.h new file mode 100644 index 0000000..9c87ad5 --- /dev/null +++ b/source/geometry/sphere.h @@ -0,0 +1,25 @@ +#ifndef MSP_GEOMETRY_SPHERE_H_ +#define MSP_GEOMETRY_SPHERE_H_ + +#include "hypersphere.h" + +namespace Msp { +namespace Geometry { + +/** +The three-dimensional special case of a HyperSphere. This class exists for +convenience only and does not provide any extra functionality over the base +class. +*/ +template +class Sphere: public HyperSphere +{ +public: + Sphere() = default; + explicit Sphere(T r): HyperSphere(r) { } +}; + +} // namespace Geometry +} // namespace Msp + +#endif