small fix and version bump
parent
6344002cf9
commit
dc88a4b79a
|
@ -1,4 +1,4 @@
|
|||
[package]
|
||||
name = "unidades"
|
||||
version = "1.1.1"
|
||||
version = "1.1.2"
|
||||
edition = "2021"
|
||||
|
|
14
src/units.rs
14
src/units.rs
|
@ -22,8 +22,18 @@ macro_rules! unit{
|
|||
};
|
||||
}
|
||||
|
||||
unit!{
|
||||
Scalar =>
|
||||
impl Unit<Scalar> for () {
|
||||
fn new(v: f64) -> Scalar {
|
||||
Scalar::new::<()>(v)
|
||||
}
|
||||
|
||||
fn scale() -> f64 {
|
||||
1.0
|
||||
}
|
||||
|
||||
fn offset() -> f64 {
|
||||
0.0
|
||||
}
|
||||
}
|
||||
|
||||
unit!{
|
||||
|
|
Loading…
Reference in New Issue