diff --git a/js/photons/model/PhotonDetector.ts b/js/photons/model/PhotonDetector.ts index 0921b7f..6ef97d2 100644 --- a/js/photons/model/PhotonDetector.ts +++ b/js/photons/model/PhotonDetector.ts @@ -103,7 +103,7 @@ export default class PhotonDetector implements TPhotonInteraction { { interactionType: 'none' }; if ( detectionResult.interactionType === 'absorbed' ) { - this.detectionCountProperty.value++; + this.detectionCountProperty.value = Math.min( this.detectionCountProperty.value + 1, COUNT_RANGE.max ); this.detectionRateProperty.countEvent(); }