| 301 | } |
| 302 | |
| 303 | static float clampDbmRangeForBottom(float bottomDbm, float rangeDb) |
| 304 | { |
| 305 | bottomDbm = clampDbmBottom(bottomDbm); |
| 306 | if (!std::isfinite(rangeDb)) { |
| 307 | rangeDb = kMinDisplayRangeDb; |
| 308 | } |
| 309 | const float maxRangeForBottom = |
| 310 | std::min(kMaxDisplayRangeDb, kMaxDisplayDbm - bottomDbm); |
| 311 | return std::clamp(rangeDb, |
| 312 | kMinDisplayRangeDb, |
| 313 | std::max(kMinDisplayRangeDb, maxRangeForBottom)); |
| 314 | } |
| 315 | |
| 316 | static float clampDbmRefForRange(float refDbm, float rangeDb) |
| 317 | { |
no test coverage detected