| 93 | } |
| 94 | |
| 95 | inline ld_type ld_offset (ld_type ld) |
| 96 | { |
| 97 | if (ld < 0) { |
| 98 | ld_type neg = ld - std::numeric_limits<ld_type>::min(); |
| 99 | ld_type pos = -(ld + 1); |
| 100 | return neg < pos ? -neg : pos; |
| 101 | } else { |
| 102 | return ld; |
| 103 | } |
| 104 | } |
| 105 | |
| 106 | /** |
| 107 | * @brief With a relative b, b is added to a. Otherwise b replaces a. |
no test coverage detected