Skip to content

Commit

Permalink
Add a getter for exponents
Browse files Browse the repository at this point in the history
  • Loading branch information
rpitasky committed Aug 19, 2024
1 parent 9fa2793 commit a2876d6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "tifloats"
version = "2.3.1"
version = "2.3.2"
edition = "2021"
license = "MIT OR Apache-2.0"
homepage = "https://github.com/TI-Toolkit/tifloats_lib_rs"
Expand Down
4 changes: 4 additions & 0 deletions src/float.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,10 @@ impl Float {
digits.truncate(new_length);
digits
}

pub fn exponent(&self) -> i8 {
self.exponent as i8
}
}

impl PartialOrd for Float {
Expand Down

0 comments on commit a2876d6

Please sign in to comment.