@@ -38,23 +38,31 @@ namespace playrho {
38
38
/// real-numbers. Ideally the implementation of this type doesn't suffer from things like:
39
39
/// catastrophic cancellation, catastrophic division, overflows, nor underflows.
40
40
///
41
- /// @note This can be implemented using float, double, long double, Fixed64, or Fixed32
42
- /// (though the use of Fixed32 is discouraged).
41
+ /// @note This can be implemented using any of the fundamental floating point types (
42
+ /// <code>float</code>, <code>double</code>, or <code>long double</code>).
43
+ /// @note This can also be implemented using a "LiteralType" that has the necessary support:
44
+ /// all common mathematical functions, support for infinity and NaN, and a specialization
45
+ /// of the <code>std::numeric_limits</code> class template for it.
46
+ /// @note At present, the <code>Fixed32</code> and <code>Fixed64</code> aliases of the
47
+ /// <code>Fixed</code> template type are provided as examples of qualifying literal types
48
+ /// though the usability of <code>Fixed32</code> is limited and its use is discouraged.
43
49
///
44
50
/// @note Regarding division:
51
+ /// - While dividing 1 by a real, caching the result, and then doing multiplications with the
52
+ /// result may well be faster (than repeatedly dividing), dividing 1 by the real can also
53
+ /// result in an underflow situation that's then compounded every time it's multiplied with
54
+ /// other values.
55
+ /// - Meanwhile, dividing every time by a real isolates any underflows to the particular
56
+ /// division where underflow occurs.
45
57
///
46
- /// While dividing 1 by a Real, caching the result, and then doing multiplications with the
47
- /// result may well be faster (than repeatedly dividing), dividing 1 by Real can also result
48
- /// in an underflow situation that's then compounded every time it's multiplied with other
49
- /// values.
50
- ///
51
- /// Meanwhile, dividing every value by Real isolates any underflows to the particular
52
- /// division where underflow occurs.
53
- ///
54
- /// @warning Using Fixed32 is not advised as it's numerical limitations are more likely to
55
- /// result in problems like overflows or underflows.
58
+ /// @warning Using <code>Fixed32</code> is not advised as it's numerical limitations are more
59
+ /// likely to result in problems like overflows or underflows.
56
60
/// @warning The note regarding division applies even more so when using a fixed-point type
57
- /// (for Real).
61
+ /// (for <code>Real</code>).
62
+ ///
63
+ /// @sa http://en.cppreference.com/w/cpp/language/types
64
+ /// @sa http://en.cppreference.com/w/cpp/types/is_floating_point
65
+ /// @sa http://en.cppreference.com/w/cpp/concept/LiteralType
58
66
///
59
67
using Real = @PLAYRHO_REAL_TYPE@;
60
68
0 commit comments