Browse Source

Math: doc++

pull/518/head
Vladimír Vondruš 5 years ago
parent
commit
7413d2053f
  1. 4
      src/Magnum/Math/Matrix.h
  2. 2
      src/Magnum/Math/Matrix3.h
  3. 2
      src/Magnum/Math/Matrix4.h
  4. 8
      src/Magnum/Math/RectangularMatrix.h
  5. 2
      src/Magnum/Math/Vector.h
  6. 2
      src/Magnum/Math/Vector2.h
  7. 2
      src/Magnum/Math/Vector3.h
  8. 2
      src/Magnum/Math/Vector4.h

4
src/Magnum/Math/Matrix.h

@ -78,7 +78,7 @@ template<std::size_t size, class T> class Matrix: public RectangularMatrix<size,
* @brief Construct an identity matrix
*
* The @p value allows you to specify a value on diagonal.
* @see @ref fromDiagonal()
* @see @ref Matrix(ZeroInitT), @ref fromDiagonal()
*/
constexpr explicit Matrix(IdentityInitT, T value = T(1)) noexcept: RectangularMatrix<size, size, T>{typename Corrade::Containers::Implementation::GenerateSequence<size>::Type{}, Vector<size, T>(value)} {}
@ -95,7 +95,7 @@ template<std::size_t size, class T> class Matrix: public RectangularMatrix<size,
constexpr explicit Matrix(T value) noexcept: RectangularMatrix<size, size, T>{typename Corrade::Containers::Implementation::GenerateSequence<size>::Type{}, value} {}
/**
* @brief Construct from a matrix of adifferent type
* @brief Construct from a matrix of a different type
*
* Performs only default casting on the values, no rounding or
* anything else. Example usage:

2
src/Magnum/Math/Matrix3.h

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

2
src/Magnum/Math/Matrix4.h

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

8
src/Magnum/Math/RectangularMatrix.h

@ -139,7 +139,7 @@ template<std::size_t cols, std::size_t rows, class T> class RectangularMatrix {
constexpr explicit RectangularMatrix(T value) noexcept: RectangularMatrix{typename Corrade::Containers::Implementation::GenerateSequence<cols>::Type{}, value} {}
/**
* @brief Construct matrix from another of different type
* @brief Construct from a matrix of a different type
*
* Performs only default casting on the values, no rounding or
* anything else. Example usage:
@ -148,13 +148,13 @@ template<std::size_t cols, std::size_t rows, class T> class RectangularMatrix {
*/
template<class U> constexpr explicit RectangularMatrix(const RectangularMatrix<cols, rows, U>& other) noexcept: RectangularMatrix(typename Corrade::Containers::Implementation::GenerateSequence<cols>::Type{}, other) {}
/** @brief Construct matrix from external representation */
/** @brief Construct a matrix from external representation */
template<class U, class V = 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 Copy constructor */
constexpr /*implicit*/ RectangularMatrix(const RectangularMatrix<cols, rows, T>&) noexcept = default;
/** @brief Convert matrix to external representation */
/** @brief Convert a matrix to external representation */
template<class U, class V = 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);
}
@ -212,7 +212,7 @@ template<std::size_t cols, std::size_t rows, class T> class RectangularMatrix {
}
/**
* @brief Non-equality operator
* @brief Non-equality comparison
*
* @see @ref Vector::operator<(), @ref Vector::operator<=(),
* @ref Vector::operator>=(), @ref Vector::operator>()

2
src/Magnum/Math/Vector.h

@ -170,7 +170,7 @@ template<std::size_t size, class T> class Vector {
}
/**
* @brief Pad vector
* @brief Pad a vector
*
* If size of @p a is smaller than @ref Size, it is padded from right
* with @p value, otherwise it's cut.

2
src/Magnum/Math/Vector2.h

@ -129,7 +129,7 @@ template<class T> class Vector2: public Vector<2, T> {
/** @copydoc Vector::Vector(const Vector<size, U>&) */
template<class U> constexpr explicit Vector2(const Vector<2, U>& other) noexcept: Vector<2, T>(other) {}
/** @brief Construct vector from external representation */
/** @brief Construct a vector from external representation */
template<class U, class V =
#ifndef CORRADE_MSVC2015_COMPATIBILITY /* Causes ICE */
decltype(Implementation::VectorConverter<2, T, U>::from(std::declval<U>()))

2
src/Magnum/Math/Vector3.h

@ -160,7 +160,7 @@ template<class T> class Vector3: public Vector<3, T> {
/** @copydoc Vector::Vector(const Vector<size, U>&) */
template<class U> constexpr explicit Vector3(const Vector<3, U>& other) noexcept: Vector<3, T>(other) {}
/** @brief Construct vector from external representation */
/** @brief Construct a vector from external representation */
template<class U, class V =
#ifndef CORRADE_MSVC2015_COMPATIBILITY /* Causes ICE */
decltype(Implementation::VectorConverter<3, T, U>::from(std::declval<U>()))

2
src/Magnum/Math/Vector4.h

@ -109,7 +109,7 @@ template<class T> class Vector4: public Vector<4, T> {
fire! FFS. */
template<class U> constexpr explicit Vector4(const Vector<4, U>& other) noexcept: Vector<4, T>(other) {}
/** @brief Construct vector from external representation */
/** @brief Construct a vector from external representation */
template<class U, class V = decltype(Implementation::VectorConverter<4, T, U>::from(std::declval<U>()))> constexpr explicit Vector4(const U& other): Vector<4, T>(Implementation::VectorConverter<4, T, U>::from(other)) {}
/** @brief Copy constructor */

Loading…
Cancel
Save