Skip to content

Commit 86791a4

Browse files
committed
Fix: Unit types divided by the same unit type should yield Dimensionless
1 parent 6811049 commit 86791a4

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/units.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ macro_rules! base_unit_struct {
2727
}
2828
}
2929
impl std::ops::Div<$name> for $name {
30-
type Output = $name;
31-
fn div(self, rhs: $name) -> $name {
32-
$name(self.0 / rhs.0)
30+
type Output = Dimensionless;
31+
fn div(self, rhs: $name) -> Dimensionless {
32+
Dimensionless(self.0 / rhs.0)
3333
}
3434
}
3535
impl std::iter::Sum for $name {

0 commit comments

Comments
 (0)