Browse Source

Math: doc++

pull/638/head
Vladimír Vondruš 2 years ago
parent
commit
fe0b470d73
  1. 10
      src/Magnum/Math/Bezier.h
  2. 10
      src/Magnum/Math/BitVector.h
  3. 4
      src/Magnum/Math/Color.h
  4. 4
      src/Magnum/Math/Complex.h
  5. 8
      src/Magnum/Math/CubicHermite.h
  6. 4
      src/Magnum/Math/Dual.h
  7. 16
      src/Magnum/Math/DualComplex.h
  8. 18
      src/Magnum/Math/DualQuaternion.h
  9. 8
      src/Magnum/Math/Frustum.h
  10. 2
      src/Magnum/Math/Matrix.h
  11. 2
      src/Magnum/Math/Matrix3.h
  12. 4
      src/Magnum/Math/Quaternion.h
  13. 18
      src/Magnum/Math/Range.h
  14. 2
      src/Magnum/Math/RectangularMatrix.h
  15. 2
      src/Magnum/Math/Vector.h

10
src/Magnum/Math/Bezier.h

@ -120,26 +120,26 @@ template<UnsignedInt order, UnsignedInt dimensions, class T> class Bezier {
*/
constexpr explicit Bezier(ZeroInitT) noexcept: Bezier<order, dimensions, T>{typename Containers::Implementation::GenerateSequence<order + 1>::Type{}, ZeroInit} {}
/** @brief Construct Bézier without initializing the contents */
/** @brief Construct a Bézier without initializing the contents */
explicit Bezier(Magnum::NoInitT) noexcept: Bezier<order, dimensions, T>{typename Containers::Implementation::GenerateSequence<order + 1>::Type{}, Magnum::NoInit} {}
/** @brief Construct Bézier curve with given array of control points */
/** @brief Construct a Bézier curve with given array of control points */
template<typename... U> constexpr /*implicit*/ Bezier(const Vector<dimensions, T>& first, U... next) noexcept: _data{first, next...} {
static_assert(sizeof...(U) + 1 == order + 1, "Wrong number of arguments");
}
/**
* @brief Construct Bézier curve from another of different type
* @brief Construct a Bézier curve from another of different type
*
* Performs only default casting on the values, no rounding or
* anything else.
*/
template<class U> constexpr explicit Bezier(const Bezier<order, dimensions, U>& other) noexcept: Bezier{typename Containers::Implementation::GenerateSequence<order + 1>::Type{}, other} {}
/** @brief Construct Bézier curve from external representation */
/** @brief Construct a Bézier curve from external representation */
template<class U, class = decltype(Implementation::BezierConverter<order, dimensions, T, U>::from(std::declval<U>()))> constexpr explicit Bezier(const U& other) noexcept: Bezier<order, dimensions, T>{Implementation::BezierConverter<order, dimensions, T, U>::from(other)} {}
/** @brief Convert Bézier curve to external representation */
/** @brief Convert the Bézier curve to external representation */
template<class U, class = decltype(Implementation::BezierConverter<order, dimensions, T, U>::to(std::declval<Bezier<order, dimensions, T>>()))> constexpr explicit operator U() const {
return Implementation::BezierConverter<order, dimensions, T, U>::to(*this);
}

10
src/Magnum/Math/BitVector.h

@ -100,14 +100,14 @@ template<std::size_t size> class BitVector {
*/
constexpr /*implicit*/ BitVector() noexcept: _data{} {}
/** @brief Construct a zero-filled boolean vector */
/** @brief Construct a zero-filled bit vector */
constexpr explicit BitVector(ZeroInitT) noexcept: _data{} {}
/** @brief Construct without initializing the contents */
explicit BitVector(Magnum::NoInitT) noexcept {}
/**
* @brief Construct a boolean vector from segment values
* @brief Construct a bit vector from segment values
* @param first Value for first 8bit segment
* @param next Values for next Bbit segments
*/
@ -117,17 +117,17 @@ template<std::size_t size> class BitVector {
template<class ...T, class U = typename std::enable_if<sizeof...(T)+1 == DataSize, bool>::type> constexpr /*implicit*/ BitVector(UnsignedByte first, T... next) noexcept: _data{first, UnsignedByte(next)...} {}
#endif
/** @brief Construct a boolean vector with one value for all fields */
/** @brief Construct a bit vector with one value for all fields */
#ifdef DOXYGEN_GENERATING_OUTPUT
explicit BitVector(T value) noexcept;
#else
template<class T, class U = typename std::enable_if<std::is_same<bool, T>::value && size != 1, bool>::type> constexpr explicit BitVector(T value) noexcept: BitVector(typename Containers::Implementation::GenerateSequence<DataSize>::Type{}, value ? FullSegmentMask : 0) {}
#endif
/** @brief Construct a boolean vector from external representation */
/** @brief Construct a bit vector from external representation */
template<class U, class = decltype(Implementation::BitVectorConverter<size, U>::from(std::declval<U>()))> constexpr explicit BitVector(const U& other) noexcept: BitVector{Implementation::BitVectorConverter<size, U>::from(other)} {}
/** @brief Convert a boolean vector to external representation */
/** @brief Convert the bit vector to external representation */
template<class U, class = decltype(Implementation::BitVectorConverter<size, U>::to(std::declval<BitVector<size>>()))> constexpr explicit operator U() const {
return Implementation::BitVectorConverter<size, U>::to(*this);
}

4
src/Magnum/Math/Color.h

@ -574,7 +574,7 @@ template<class T> class Color3: public Vector3<T> {
/** @copydoc Vector::Vector(const BitVector<size>&) */
constexpr explicit Color3(const BitVector3& other) noexcept: Vector3<T>{other} {}
/** @brief Construct color from external representation */
/** @brief Construct a color from external representation */
template<class U, class =
#ifndef CORRADE_MSVC2015_COMPATIBILITY /* Causes ICE */
decltype(Implementation::VectorConverter<3, T, U>::from(std::declval<U>()))
@ -1062,7 +1062,7 @@ class Color4: public Vector4<T> {
/** @copydoc Vector::Vector(const BitVector<size>&) */
constexpr explicit Color4(const BitVector4& other) noexcept: Vector4<T>{other} {}
/** @brief Construct color from external representation */
/** @brief Construct a color from external representation */
template<class U, class =
#ifndef CORRADE_MSVC2015_COMPATIBILITY /* Causes ICE */
decltype(Implementation::VectorConverter<4, T, U>::from(std::declval<U>()))

4
src/Magnum/Math/Complex.h

@ -116,7 +116,7 @@ template<class T> class Complex {
}
/**
* @brief Create complex number from rotation matrix
* @brief Create a complex number from a rotation matrix
*
* Expects that the matrix is a pure rotation, i.e. orthogonal and
* without any reflection. See @ref Matrix3::rotation() const for an
@ -179,7 +179,7 @@ template<class T> class Complex {
/** @brief Construct a complex number from external representation */
template<class U, class = decltype(Implementation::ComplexConverter<T, U>::from(std::declval<U>()))> constexpr explicit Complex(const U& other): Complex{Implementation::ComplexConverter<T, U>::from(other)} {}
/** @brief Convert a complex number to external representation */
/** @brief Convert the complex number to external representation */
template<class U, class = decltype(Implementation::ComplexConverter<T, U>::to(std::declval<Complex<T>>()))> constexpr explicit operator U() const {
return Implementation::ComplexConverter<T, U>::to(*this);
}

8
src/Magnum/Math/CubicHermite.h

@ -60,7 +60,7 @@ template<class T> class CubicHermite {
typedef T Type; /**< @brief Underlying data type */
/**
* @brief Create cubic Hermite spline point from adjacent Bézier curve segments
* @brief Create a cubic Hermite spline point from adjacent Bézier curve segments
*
* Given two adjacent cubic Bézier curve segments defined by points
* @f$ \boldsymbol{a}_i @f$ and @f$ \boldsymbol{b}_i @f$,
@ -125,11 +125,11 @@ template<class T> class CubicHermite {
*/
template<class U = T, class = typename std::enable_if<std::is_constructible<U, IdentityInitT>::value>::type> constexpr explicit CubicHermite(IdentityInitT) noexcept: _inTangent{ZeroInit}, _point{IdentityInit}, _outTangent{ZeroInit} {}
/** @brief Construct cubic Hermite spline point without initializing its contents */
/** @brief Construct a cubic Hermite spline point without initializing its contents */
explicit CubicHermite(Magnum::NoInitT) noexcept: CubicHermite{Magnum::NoInit, typename std::conditional<std::is_constructible<T, Magnum::NoInitT>::value, Magnum::NoInitT*, void*>::type{}} {}
/**
* @brief Construct cubic Hermite spline point with given control points
* @brief Construct a cubic Hermite spline point with given control points
* @param inTangent In-tangent @f$ \boldsymbol{m} @f$
* @param point Point @f$ \boldsymbol{p} @f$
* @param outTangent Out-tangent @f$ \boldsymbol{n} @f$
@ -137,7 +137,7 @@ template<class T> class CubicHermite {
constexpr /*implicit*/ CubicHermite(const T& inTangent, const T& point, const T& outTangent) noexcept: _inTangent{inTangent}, _point{point}, _outTangent{outTangent} {}
/**
* @brief Construct cubic Hermite spline point from another of different type
* @brief Construct a cubic Hermite spline point from another of different type
*
* Performs only default casting on the values, no rounding or
* anything else.

4
src/Magnum/Math/Dual.h

@ -95,7 +95,7 @@ template<class T> class Dual {
#endif
/**
* @brief Construct dual number from real and dual part
* @brief Construct a dual number from real and dual part
*
* @f[
* \hat a = a_0 + \epsilon a_\epsilon
@ -111,7 +111,7 @@ template<class T> class Dual {
#endif
/**
* @brief Construct dual number from another of different type
* @brief Construct a dual number from another of different type
*
* Performs only default casting on the values, no rounding or anything
* else. Example usage:

16
src/Magnum/Math/DualComplex.h

@ -99,7 +99,7 @@ template<class T> class DualComplex: public Dual<Complex<T>> {
}
/**
* @brief Create dual complex number from rotation matrix
* @brief Create a dual complex number from rotation matrix
*
* Expects that the matrix represents rigid transformation.
* @see @ref toMatrix(), @ref Complex::fromMatrix(),
@ -112,7 +112,7 @@ template<class T> class DualComplex: public Dual<Complex<T>> {
}
/**
* @brief Create dual complex from rotation complex and translation vector
* @brief Create a dual complex from rotation complex and translation vector
* @m_since_latest
*
* @f[
@ -144,14 +144,14 @@ template<class T> class DualComplex: public Dual<Complex<T>> {
*/
constexpr explicit DualComplex(IdentityInitT) noexcept: Dual<Complex<T>>({}, {T(0), T(0)}) {}
/** @brief Construct zero-initialized dual complex number */
/** @brief Construct a zero-initialized dual complex number */
constexpr explicit DualComplex(ZeroInitT) noexcept: Dual<Complex<T>>{Complex<T>{ZeroInit}, Complex<T>{ZeroInit}} {}
/** @brief Construct without initializing the contents */
explicit DualComplex(Magnum::NoInitT) noexcept: Dual<Complex<T>>{Magnum::NoInit} {}
/**
* @brief Construct dual complex number from real and dual part
* @brief Construct a dual complex number from real and dual part
*
* @f[
* \hat c = c_0 + \epsilon c_\epsilon
@ -166,7 +166,7 @@ template<class T> class DualComplex: public Dual<Complex<T>> {
ambiguous with the above */
/**
* @brief Construct dual complex number from vector
* @brief Construct a dual complex number from vector
*
* To be used in transformations later. @f[
* \hat c = (0 + i1) + \epsilon(v_x + iv_y)
@ -175,20 +175,20 @@ template<class T> class DualComplex: public Dual<Complex<T>> {
constexpr explicit DualComplex(const Vector2<T>& vector) noexcept: Dual<Complex<T>>({}, Complex<T>(vector)) {}
/**
* @brief Construct dual complex number from another of different type
* @brief Construct a dual complex number from another of different type
*
* Performs only default casting on the values, no rounding or anything
* else.
*/
template<class U> constexpr explicit DualComplex(const DualComplex<U>& other) noexcept: Dual<Complex<T>>{other} {}
/** @brief Construct dual complex number from external representation */
/** @brief Construct a dual complex number from external representation */
template<class U, class = decltype(Implementation::DualComplexConverter<T, U>::from(std::declval<U>()))> constexpr explicit DualComplex(const U& other): DualComplex{Implementation::DualComplexConverter<T, U>::from(other)} {}
/** @brief Copy constructor */
constexpr /*implicit*/ DualComplex(const Dual<Complex<T>>& other) noexcept: Dual<Complex<T>>(other) {}
/** @brief Convert dual complex number to external representation */
/** @brief Convert the dual complex number to external representation */
template<class U, class = decltype(Implementation::DualComplexConverter<T, U>::to(std::declval<DualComplex<T>>()))> constexpr explicit operator U() const {
return Implementation::DualComplexConverter<T, U>::to(*this);
}

18
src/Magnum/Math/DualQuaternion.h

@ -236,7 +236,7 @@ template<class T> class DualQuaternion: public Dual<Quaternion<T>> {
}
/**
* @brief Create dual quaternion from transformation matrix
* @brief Create a dual quaternion from a transformation matrix
*
* Expects that the matrix represents rigid transformation.
* @see @ref toMatrix(), @ref Quaternion::fromMatrix(),
@ -251,7 +251,7 @@ template<class T> class DualQuaternion: public Dual<Quaternion<T>> {
}
/**
* @brief Create dual quaternion from rotation quaternion and translation vector
* @brief Create a dual quaternion from a rotation quaternion and a translation vector
* @m_since_latest
*
* @f[
@ -283,14 +283,14 @@ template<class T> class DualQuaternion: public Dual<Quaternion<T>> {
*/
constexpr explicit DualQuaternion(IdentityInitT) noexcept: Dual<Quaternion<T>>{{}, {{}, T(0)}} {}
/** @brief Construct zero-initialized dual quaternion */
/** @brief Construct a zero-initialized dual quaternion */
constexpr explicit DualQuaternion(ZeroInitT) noexcept: Dual<Quaternion<T>>{Quaternion<T>{ZeroInit}, Quaternion<T>{ZeroInit}} {}
/** @brief Construct without initializing the contents */
explicit DualQuaternion(Magnum::NoInitT) noexcept: Dual<Quaternion<T>>{Magnum::NoInit} {}
/**
* @brief Construct dual quaternion from real and dual part
* @brief Construct a dual quaternion from a real and a dual part
*
* @f[
* \hat q = q_0 + \epsilon q_\epsilon
@ -302,7 +302,7 @@ template<class T> class DualQuaternion: public Dual<Quaternion<T>> {
constexpr /*implicit*/ DualQuaternion(const Quaternion<T>& real, const Quaternion<T>& dual = Quaternion<T>({}, T(0))) noexcept: Dual<Quaternion<T>>(real, dual) {}
/**
* @brief Construct dual quaternion from dual vector and scalar parts
* @brief Construct a dual quaternion from dual vector and scalar parts
*
* @f[
* \hat q = [\hat{\boldsymbol v}, \hat s] = [\boldsymbol v_0, s_0] + \epsilon [\boldsymbol v_\epsilon, s_\epsilon]
@ -311,7 +311,7 @@ template<class T> class DualQuaternion: public Dual<Quaternion<T>> {
constexpr /*implicit*/ DualQuaternion(const Dual<Vector3<T>>& vector, const Dual<T>& scalar) noexcept: Dual<Quaternion<T>>{{vector.real(), scalar.real()}, {vector.dual(), scalar.dual()}} {}
/**
* @brief Construct dual quaternion from vector
* @brief Construct a dual quaternion from a vector
*
* To be used in transformations later. @f[
* \hat q = [\boldsymbol 0, 1] + \epsilon [\boldsymbol v, 0]
@ -321,20 +321,20 @@ template<class T> class DualQuaternion: public Dual<Quaternion<T>> {
constexpr explicit DualQuaternion(const Vector3<T>& vector) noexcept: Dual<Quaternion<T>>({}, {vector, T(0)}) {}
/**
* @brief Construct dual quaternion from another of different type
* @brief Construct a dual quaternion from another of different type
*
* Performs only default casting on the values, no rounding or anything
* else.
*/
template<class U> constexpr explicit DualQuaternion(const DualQuaternion<U>& other) noexcept: Dual<Quaternion<T>>(other) {}
/** @brief Construct dual quaternion from external representation */
/** @brief Construct a dual quaternion from external representation */
template<class U, class = decltype(Implementation::DualQuaternionConverter<T, U>::from(std::declval<U>()))> constexpr explicit DualQuaternion(const U& other): DualQuaternion{Implementation::DualQuaternionConverter<T, U>::from(other)} {}
/** @brief Copy constructor */
constexpr /*implicit*/ DualQuaternion(const Dual<Quaternion<T>>& other) noexcept: Dual<Quaternion<T>>(other) {}
/** @brief Convert dual quaternion to external representation */
/** @brief Convert the dual quaternion to external representation */
template<class U, class = decltype(Implementation::DualQuaternionConverter<T, U>::to(std::declval<DualQuaternion<T>>()))> constexpr explicit operator U() const {
return Implementation::DualQuaternionConverter<T, U>::to(*this);
}

8
src/Magnum/Math/Frustum.h

@ -67,7 +67,7 @@ bottom (index `2`), top (index `3`), near (index `4`) and far (index `5`).
*/
template<class T> class Frustum {
public:
/** @brief Create a frustum from projection matrix */
/** @brief Create a frustum from a projection matrix */
static Frustum<T> fromMatrix(const Matrix4<T>& m) {
return {m.row(3) + m.row(0),
m.row(3) - m.row(0),
@ -105,17 +105,17 @@ template<class T> class Frustum {
constexpr /*implicit*/ Frustum(const Vector4<T>& left, const Vector4<T>& right, const Vector4<T>& bottom, const Vector4<T>& top, const Vector4<T>& near, const Vector4<T>& far) noexcept: _data{left, right, bottom, top, near, far} {}
/**
* @brief Construct frustum from another of different type
* @brief Construct a frustum from another of different type
*
* Performs only default casting on the values, no rounding or
* anything else.
*/
template<class U> constexpr explicit Frustum(const Frustum<U>& other) noexcept;
/** @brief Construct frustum from external representation */
/** @brief Construct a frustum from external representation */
template<class U, class = decltype(Implementation::FrustumConverter<T, U>::from(std::declval<U>()))> constexpr explicit Frustum(const U& other) noexcept: Frustum<T>{Implementation::FrustumConverter<T, U>::from(other)} {}
/** @brief Convert frustum to external representation */
/** @brief Convert the frustum to external representation */
template<class U, class = decltype(Implementation::FrustumConverter<T, U>::to(std::declval<Frustum<T>>()))> constexpr explicit operator U() const {
return Implementation::FrustumConverter<T, U>::to(*this);
}

2
src/Magnum/Math/Matrix.h

@ -99,7 +99,7 @@ template<std::size_t size, class T> class Matrix: public RectangularMatrix<size,
*/
template<class U> constexpr explicit Matrix(const RectangularMatrix<size, size, U>& other) noexcept: RectangularMatrix<size, size, T>(other) {}
/** @brief Construct matrix from external representation */
/** @brief Construct a matrix from external representation */
template<class U, class = decltype(Implementation::RectangularMatrixConverter<size, size, T, U>::from(std::declval<U>()))> constexpr explicit Matrix(const U& other): RectangularMatrix<size, size, T>(Implementation::RectangularMatrixConverter<size, size, T, U>::from(other)) {}
/** @copydoc RectangularMatrix::RectangularMatrix(IdentityInitT, const RectangularMatrix<otherCols, otherRows, T>&, T) */

2
src/Magnum/Math/Matrix3.h

@ -258,7 +258,7 @@ template<class T> class Matrix3: public Matrix3x3<T> {
static Matrix3<T> projection(const Vector2<T>& bottomLeft, const Vector2<T>& topRight);
/**
* @brief Create matrix from rotation/scaling part and translation part
* @brief Create a matrix from a rotation/scaling part and a translation part
* @param rotationScaling Rotation/scaling part (upper-left 2x2
* matrix)
* @param translation Translation part (first two elements of

4
src/Magnum/Math/Quaternion.h

@ -407,10 +407,10 @@ template<class T> class Quaternion {
*/
template<class U> constexpr explicit Quaternion(const Quaternion<U>& other) noexcept: _vector{other._vector}, _scalar{T(other._scalar)} {}
/** @brief Construct quaternion from external representation */
/** @brief Construct a quaternion from external representation */
template<class U, class = decltype(Implementation::QuaternionConverter<T, U>::from(std::declval<U>()))> constexpr explicit Quaternion(const U& other): Quaternion{Implementation::QuaternionConverter<T, U>::from(other)} {}
/** @brief Convert quaternion to external representation */
/** @brief Convert the quaternion to external representation */
template<class U, class = decltype(Implementation::QuaternionConverter<T, U>::to(std::declval<Quaternion<T>>()))> constexpr explicit operator U() const {
return Implementation::QuaternionConverter<T, U>::to(*this);
}

18
src/Magnum/Math/Range.h

@ -100,7 +100,7 @@ template<UnsignedInt dimensions, class T> class Range {
typedef typename Implementation::RangeTraits<dimensions, T>::Type VectorType;
/**
* @brief Create a range from minimal coordinates and size
* @brief Create a range from minimal coordinates and a size
* @param min Minimal coordinates
* @param size Range size
*/
@ -109,7 +109,7 @@ template<UnsignedInt dimensions, class T> class Range {
}
/**
* @brief Create a range from center and half size
* @brief Create a range from a center and a half size
* @param center Range center
* @param halfSize Half size
*
@ -165,7 +165,7 @@ template<UnsignedInt dimensions, class T> class Range {
constexpr /*implicit*/ Range(const Containers::Pair<Vector<dimensions, T>, Vector<dimensions, T>>& minmax) noexcept: _min{minmax.first()}, _max{minmax.second()} {}
/**
* @brief Construct range from another of different type
* @brief Construct a range from another of different type
*
* Performs only default casting on the values, no rounding or
* anything else. Example usage:
@ -174,10 +174,10 @@ template<UnsignedInt dimensions, class T> class Range {
*/
template<class U> constexpr explicit Range(const Range<dimensions, U>& other) noexcept: _min(other._min), _max(other._max) {}
/** @brief Construct range from external representation */
/** @brief Construct a range from external representation */
template<class U, class = decltype(Implementation::RangeConverter<dimensions, T, U>::from(std::declval<U>()))> constexpr explicit Range(const U& other): Range{Implementation::RangeConverter<dimensions, T, U>::from(other)} {}
/** @brief Convert range to external representation */
/** @brief Convert the range to external representation */
template<class U, class = decltype(Implementation::RangeConverter<dimensions, T, U>::to(std::declval<Range<dimensions, T>>()))> constexpr explicit operator U() const {
return Implementation::RangeConverter<dimensions, T, U>::to(*this);
}
@ -467,9 +467,7 @@ template<class T> class Range2D: public Range<2, T> {
/** @copydoc Range(const Range<dimensions, U>&) */
template<class U> constexpr explicit Range2D(const Range2D<U>& other) noexcept: Range<2, T>(other) {}
/**
* @brief Construct range from external representation
*/
/** @brief Construct a range from external representation */
template<class U, class =
#ifndef CORRADE_MSVC2015_COMPATIBILITY /* Causes ICE */
decltype(Implementation::RangeConverter<2, T, U>::from(std::declval<U>()))
@ -618,9 +616,7 @@ template<class T> class Range3D: public Range<3, T> {
/** @copydoc Range(const Range<dimensions, U>&) */
template<class U> constexpr explicit Range3D(const Range3D<U>& other) noexcept: Range<3, T>(other) {}
/**
* @brief Construct range from external representation
*/
/** @brief Construct a range from external representation */
template<class U, class = decltype(Implementation::RangeConverter<3, T, U>::from(std::declval<U>()))> constexpr explicit Range3D(const U& other) noexcept: Range<3, T>{Implementation::RangeConverter<3, T, U>::from(other)} {}
/** @brief Copy constructor */

2
src/Magnum/Math/RectangularMatrix.h

@ -215,7 +215,7 @@ template<std::size_t cols, std::size_t rows, class T> class RectangularMatrix {
/** @brief Construct a matrix from external representation */
template<class U, class = decltype(Implementation::RectangularMatrixConverter<cols, rows, T, U>::from(std::declval<U>()))> constexpr explicit RectangularMatrix(const U& other): RectangularMatrix(Implementation::RectangularMatrixConverter<cols, rows, T, U>::from(other)) {}
/** @brief Convert a matrix to external representation */
/** @brief Convert the matrix to external representation */
template<class U, class = decltype(Implementation::RectangularMatrixConverter<cols, rows, T, U>::to(std::declval<RectangularMatrix<cols, rows, T>>()))> constexpr explicit operator U() const {
return Implementation::RectangularMatrixConverter<cols, rows, T, U>::to(*this);
}

2
src/Magnum/Math/Vector.h

@ -252,7 +252,7 @@ template<std::size_t size, class T> class Vector {
/** @brief Construct a vector from external representation */
template<class U, class = decltype(Implementation::VectorConverter<size, T, U>::from(std::declval<U>()))> constexpr explicit Vector(const U& other) noexcept: Vector(Implementation::VectorConverter<size, T, U>::from(other)) {}
/** @brief Convert a vector to external representation */
/** @brief Convert the vector to external representation */
template<class U, class = decltype(Implementation::VectorConverter<size, T, U>::to(std::declval<Vector<size, T>>()))> constexpr explicit operator U() const {
return Implementation::VectorConverter<size, T, U>::to(*this);
}

Loading…
Cancel
Save