Skip to content

Commit

Permalink
-1 is returned from getNuclideHalfLife for unknown half-life's. phets…
Browse files Browse the repository at this point in the history
  • Loading branch information
Luisav1 committed Aug 16, 2023
1 parent b28c449 commit 3aa5b60
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions js/AtomIdentifier.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14377,10 +14377,14 @@ const AtomIdentifier = {
},

// Get the half-life of a nuclide with the specified number of protons and neutrons.
// Return -1 if the half-life data is missing.
getNuclideHalfLife: function( numProtons: number, numNeutrons: number ): number | null | undefined {
if ( !HalfLifeConstants[ numProtons ] ) {
return undefined;
}
else if ( HalfLifeConstants[ numProtons ][ numNeutrons ] === null ) {
return -1;
}
return HalfLifeConstants[ numProtons ][ numNeutrons ];
},

Expand Down

1 comment on commit 3aa5b60

@zepumph
Copy link
Member

Choose a reason for hiding this comment

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

#111

Please sign in to comment.