@@ -26,7 +26,9 @@ pub struct Area {
26
26
impl Area {
27
27
/// Create new area from floating point value in Square Meters
28
28
pub fn from_square_meters ( square_meters : f64 ) -> Self {
29
- Area { square_meters : square_meters }
29
+ Area {
30
+ square_meters : square_meters,
31
+ }
30
32
}
31
33
32
34
/// Create new area from floating point value in Square Metres
@@ -49,7 +51,8 @@ impl Area {
49
51
/// Create new area from floating point value in Square Micrometers
50
52
pub fn from_square_micrometers ( square_micrometers : f64 ) -> Self {
51
53
Self :: from_square_meters (
52
- square_micrometers / ( length:: METER_MICROMETER_FACTOR * length:: METER_MICROMETER_FACTOR ) ,
54
+ square_micrometers
55
+ / ( length:: METER_MICROMETER_FACTOR * length:: METER_MICROMETER_FACTOR ) ,
53
56
)
54
57
}
55
58
@@ -61,7 +64,8 @@ impl Area {
61
64
/// Create new area from floating point value in Square Millimeters
62
65
pub fn from_square_millimeters ( square_millimeters : f64 ) -> Self {
63
66
Self :: from_square_meters (
64
- square_millimeters / ( length:: METER_MILLIMETER_FACTOR * length:: METER_MILLIMETER_FACTOR ) ,
67
+ square_millimeters
68
+ / ( length:: METER_MILLIMETER_FACTOR * length:: METER_MILLIMETER_FACTOR ) ,
65
69
)
66
70
}
67
71
@@ -73,7 +77,8 @@ impl Area {
73
77
/// Create new area from floating point value in Square Centimeters
74
78
pub fn from_square_centimeters ( square_centimeters : f64 ) -> Self {
75
79
Self :: from_square_meters (
76
- square_centimeters / ( length:: METER_CENTIMETER_FACTOR * length:: METER_CENTIMETER_FACTOR ) ,
80
+ square_centimeters
81
+ / ( length:: METER_CENTIMETER_FACTOR * length:: METER_CENTIMETER_FACTOR ) ,
77
82
)
78
83
}
79
84
@@ -97,7 +102,8 @@ impl Area {
97
102
/// Create new area from floating point value in Square Hectometers
98
103
pub fn from_square_hectometers ( square_hectometers : f64 ) -> Self {
99
104
Self :: from_square_meters (
100
- square_hectometers / ( length:: METER_HECTOMETER_FACTOR * length:: METER_HECTOMETER_FACTOR ) ,
105
+ square_hectometers
106
+ / ( length:: METER_HECTOMETER_FACTOR * length:: METER_HECTOMETER_FACTOR ) ,
101
107
)
102
108
}
103
109
0 commit comments