(precision: f32, mut value: f32)
| 241 | |
| 242 | impl Bpsk { |
| 243 | fn quantize(precision: f32, mut value: f32) -> i8 { |
| 244 | value *= 2.0 * precision; |
| 245 | value = value.round(); |
| 246 | value = value.clamp(-128.0, 127.0); |
| 247 | value as i8 |
| 248 | } |
| 249 | |
| 250 | fn soft(b: &mut i8, c: Complex32, precision: f32) { |
| 251 | *b = Self::quantize(precision, c.re); |
nothing calls this directly
no outgoing calls
no test coverage detected