| 134 | } |
| 135 | |
| 136 | double trip() const |
| 137 | { |
| 138 | double t1 = t + 0.75 + 0.5 * pulseWidth; |
| 139 | t1 -= bitwise_or_zero(t1); |
| 140 | |
| 141 | double y; |
| 142 | if (t1 >= pulseWidth) |
| 143 | { |
| 144 | y = -pulseWidth; |
| 145 | } |
| 146 | else |
| 147 | { |
| 148 | y = 4 * t1; |
| 149 | y = (y >= 2 * pulseWidth ? 4 - y / pulseWidth - pulseWidth : y / pulseWidth - pulseWidth); |
| 150 | } |
| 151 | |
| 152 | if (pulseWidth > 0) |
| 153 | { |
| 154 | double t2 = t1 + 1 - 0.5 * pulseWidth; |
| 155 | t2 -= bitwise_or_zero(t2); |
| 156 | |
| 157 | double t3 = t1 + 1 - pulseWidth; |
| 158 | t3 -= bitwise_or_zero(t3); |
| 159 | y += 2 * freqInSecondsPerSample / pulseWidth * (blamp(t1, freqInSecondsPerSample) - 2 * blamp(t2, freqInSecondsPerSample) + blamp(t3, freqInSecondsPerSample)); |
| 160 | } |
| 161 | return amplitude * y; |
| 162 | } |
| 163 | |
| 164 | double trap() const |
| 165 | { |
nothing calls this directly
no test coverage detected