Inviwo  0.9.10.1
Inviwo documentation
inviwo::util::detail::rangeRatioImpl< T, D1, D2 > Struct Template Reference

#include <glm.h>

Static Public Attributes

static const T value = ((T{1} << D2) + T{1}) * rangeRatioImpl<T, D1, D2 * 2>::value
 

Detailed Description

template<typename T, size_t D1, size_t D2>
struct inviwo::util::detail::rangeRatioImpl< T, D1, D2 >

The size of a integer types domain is 2^digits - 1 The ratio between two types is then (2^d1 - 1) / (2^d2 - 1) which for power of 2 number of digits can be written as:

(-1 + x)(1+x^1)(1+x^2)(1+x^4)(1+x^8)...(1+x^d1/2)

(-1 + x)(1+x^1)(1+x^2)(1+x^4)(1+x^8)...(1+x^d2/2)

assuming that d1 > d2 can be simplified to:

(1+x^d2)...(1+x^d1/2)


The documentation for this struct was generated from the following file: