Browse Source

Added @todos.

vectorfields
Vladimír Vondruš 14 years ago
parent
commit
eeca90c17c
  1. 1
      src/AbstractImage.h
  2. 2
      src/Color.h
  3. 4
      src/Math/Math.h

1
src/AbstractImage.h

@ -44,6 +44,7 @@ class MAGNUM_EXPORT AbstractImage {
*/ */
/** @brief Color components */ /** @brief Color components */
/** @todo Support *_INTEGER types */
enum class Components: GLenum { enum class Components: GLenum {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
/** /**

2
src/Color.h

@ -140,6 +140,8 @@ is always in range in range @f$ [0.0, 360.0] @f$, saturation and value in
range @f$ [0.0, 1.0] @f$. range @f$ [0.0, 1.0] @f$.
@see Color4 @see Color4
@todo Signed normalization to [-1.0, 1.0] like in OpenGL?
*/ */
template<class T> class Color3: public Math::Vector3<T> { template<class T> class Color3: public Math::Vector3<T> {
public: public:

4
src/Math/Math.h

@ -104,6 +104,8 @@ float a = normalize<float>('\127');
// b = 1.0f // b = 1.0f
float b = normalize<float, char>('\127'); float b = normalize<float, char>('\127');
@endcode @endcode
@todo Signed normalization to [-1.0, 1.0] like in OpenGL?
*/ */
template<class FloatingPoint, class Integral> inline constexpr typename std::enable_if<std::is_floating_point<FloatingPoint>::value && std::is_integral<Integral>::value, FloatingPoint>::type normalize(Integral value) { template<class FloatingPoint, class Integral> inline constexpr typename std::enable_if<std::is_floating_point<FloatingPoint>::value && std::is_integral<Integral>::value, FloatingPoint>::type normalize(Integral value) {
return (FloatingPoint(value)-FloatingPoint(std::numeric_limits<Integral>::min()))/ return (FloatingPoint(value)-FloatingPoint(std::numeric_limits<Integral>::min()))/
@ -118,6 +120,8 @@ integral type.
@note For best precision, `FloatingPoint` type should be always larger that @note For best precision, `FloatingPoint` type should be always larger that
resulting `Integral` type (e.g. `double` to `int`, `long double` to `long long`). resulting `Integral` type (e.g. `double` to `int`, `long double` to `long long`).
@todo Signed normalization to [-1.0, 1.0] like in OpenGL?
*/ */
template<class Integral, class FloatingPoint> inline constexpr typename std::enable_if<std::is_floating_point<FloatingPoint>::value && std::is_integral<Integral>::value, Integral>::type denormalize(FloatingPoint value) { template<class Integral, class FloatingPoint> inline constexpr typename std::enable_if<std::is_floating_point<FloatingPoint>::value && std::is_integral<Integral>::value, Integral>::type denormalize(FloatingPoint value) {
return std::numeric_limits<Integral>::min() + return std::numeric_limits<Integral>::min() +

Loading…
Cancel
Save