Skip to content

Commit 1196e8b

Browse files
authored
Fix meter_per_second to meters_per_seconds (#3015)
1 parent 91cb695 commit 1196e8b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

source/docs/software/basic-programming/cpp-units.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ To create an instance of a specific unit, we create an instance of its container
7474

7575
```c++
7676
// The variable speed has a value of 5 meters per second.
77-
units::meter_per_second_t speed{5.0};
77+
units::meters_per_second_t speed{5.0};
7878
```
7979

8080
Alternatively, the units library has [type literals](https://en.cppreference.com/w/cpp/language/user_literal) defined for some of the more common container types. These can be used in conjunction with type inference via ``auto`` to define a unit more succinctly:
@@ -114,7 +114,7 @@ auto sum = 5_m + 7_s;
114114

115115
Multiplication may be performed on any pair of container types, and yields the container type of a compound unit:
116116

117-
.. note:: When a calculation yields a compound unit type, this type will only be checked for validity at the point of operation if the result type is specified explicitly. If ``auto`` is used, this check will not occur. For example, when we divide distance by time, we may want to ensure the result is, indeed, a velocity (i.e. ``units::meter_per_second_t``). If the return type is declared as ``auto``, this check will not be made.
117+
.. note:: When a calculation yields a compound unit type, this type will only be checked for validity at the point of operation if the result type is specified explicitly. If ``auto`` is used, this check will not occur. For example, when we divide distance by time, we may want to ensure the result is, indeed, a velocity (i.e. ``units::meters_per_second_t``). If the return type is declared as ``auto``, this check will not be made.
118118

119119
```c++
120120
// Multiply two meter_t values, result is square_meter_t
@@ -123,7 +123,7 @@ auto product = 5_m * 7_m; // product is 35_sq_m
123123

124124
```c++
125125
// Divide a meter_t value by a second_t, result is a meter_per_second_t
126-
units::meter_per_second_t speed = 6_m / 0.5_s; // speed is 12_mps
126+
units::meters_per_second_t speed = 6_m / 0.5_s; // speed is 12_mps
127127
```
128128

129129
### ``<cmath>`` Functions

0 commit comments

Comments
 (0)