Missile application.
(atkEr, atkEv, atkDrf, tgtSpeed, tgtSigRadius)
| 413 | # Missile-specific math |
| 414 | @lru_cache(maxsize=200) |
| 415 | def _calcMissileFactor(atkEr, atkEv, atkDrf, tgtSpeed, tgtSigRadius): |
| 416 | """Missile application.""" |
| 417 | factors = [1] |
| 418 | # "Slow" part |
| 419 | if atkEr > 0: |
| 420 | factors.append(tgtSigRadius / atkEr) |
| 421 | # "Fast" part |
| 422 | if tgtSpeed > 0: |
| 423 | factors.append(((atkEv * tgtSigRadius) / (atkEr * tgtSpeed)) ** atkDrf) |
| 424 | totalMult = min(factors) |
| 425 | return totalMult |
| 426 | |
| 427 | |
| 428 | def _calcAggregatedDrf(reductionFactor, reductionSensitivity): |
no test coverage detected