mirror of
https://github.com/rm-dr/daisy
synced 2025-07-01 14:43:30 -07:00
Improved unit printing
This commit is contained in:
@ -26,9 +26,11 @@ pub struct Quantity {
|
||||
impl ToString for Quantity {
|
||||
fn to_string(&self) -> String {
|
||||
let mut n = self.v.to_string();
|
||||
if self.unitless() { return n; }
|
||||
|
||||
n.push(' ');
|
||||
n.push_str(&self.u.to_string());
|
||||
n
|
||||
return n;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user