Skip to content

Commit

Permalink
-1 is returned from getNuclideHalfLife for unknown half-life's. #126.
Browse files Browse the repository at this point in the history
  • Loading branch information
Luisav1 committed Aug 16, 2023
1 parent 76dccb6 commit 253b34e
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions js/decay/model/DecayModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,7 @@ class DecayModel extends BANModel<ParticleAtom> {
halfLife = Math.pow( 10, BANConstants.HALF_LIFE_NUMBER_LINE_END_EXPONENT );
}

// the nuclide is unstable and its half-life data is missing, set -1 as the half-life as a placeholder
else if ( AtomIdentifier.getNuclideHalfLife( protonNumber, neutronNumber ) === null ) {
halfLife = -1;
}

// the nuclide is unstable and its half-life data is not missing, update its half-life
// the nuclide is unstable, update its half-life
else {
halfLife = AtomIdentifier.getNuclideHalfLife( protonNumber, neutronNumber );
}
Expand Down

1 comment on commit 253b34e

@Luisav1
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, meant for #111.

Please sign in to comment.