mirror of
https://github.com/rm-dr/daisy
synced 2025-10-20 00:54:28 -07:00
Added nounit and tobase functions
This commit is contained in:
@ -51,7 +51,7 @@ impl FreeUnit {
|
||||
}
|
||||
|
||||
// Get this unit in terms of base units
|
||||
pub fn get_base(&self) -> Quantity {
|
||||
pub fn to_base(&self) -> Quantity {
|
||||
let q = self.whole.base_factor();
|
||||
let mut q = q.unwrap_or(Quantity::new_rational_from_string("1").unwrap());
|
||||
|
||||
|
Reference in New Issue
Block a user