Skip to content

Commit

Permalink
Implement ToMagnitude for Atom
Browse files Browse the repository at this point in the history
  • Loading branch information
turboladen committed Feb 2, 2024
1 parent d0f1934 commit 86e92e8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions api/src/parser/atom/v2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,9 @@ impl convert::ToScalar<f64> for Atom {
<Self as UcumUnit>::scalar(self)
}
}

impl convert::ToMagnitude<f64> for Atom {
fn to_magnitude(&self) -> f64 {
<Self as UcumUnit>::magnitude(self)
}
}

0 comments on commit 86e92e8

Please sign in to comment.