File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 {
@@ -60,19 +60,19 @@ macro_rules! base_unit_struct {
6060 }
6161 impl $name {
6262 /// Returns the underlying f64 value.
63- pub fn value( self ) -> f64 {
63+ pub fn value( & self ) -> f64 {
6464 self . 0
6565 }
6666 /// Returns true if the value is a normal number.
67- pub fn is_normal( self ) -> bool {
67+ pub fn is_normal( & self ) -> bool {
6868 self . 0 . is_normal( )
6969 }
7070 /// Returns true if the value is finite.
71- pub fn is_finite( self ) -> bool {
71+ pub fn is_finite( & self ) -> bool {
7272 self . 0 . is_finite( )
7373 }
7474 /// Returns the absolute value of this unit.
75- pub fn abs( self ) -> Self {
75+ pub fn abs( & self ) -> Self {
7676 $name( self . 0 . abs( ) )
7777 }
7878 }
You can’t perform that action at this time.
0 commit comments