Skip to content

Commit

Permalink
Fix typos in README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
KlasMvW committed Apr 19, 2022
1 parent 8529075 commit d316e77
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ target_compile_definitions(my_target PRIVATE TU_TYPE=<float, double>)

## Test suite

TU comes with its own test suite. It does not rely on any externa testing tool. To verify that TU runs on your system, build the test suite with CMake.
TU comes with its own test suite. It does not rely on any external testing tool. To verify that TU runs on your system, build the test suite with CMake.

The following instruction assumes that you do an out of source build in a directory under the repository root.

Expand All @@ -135,7 +135,7 @@ The test suite test TU for both float and double as underlying datatype.

The aim of TU is to be

* compliant to definitions and guides of official bodies. For SI units, TU aims for compliance with the definitions issued by Bureau Interbational des Poids et Mesures (BIPM). See [link to bimp.org](https://www.bipm.org/documents/20126/41483022/SI-Brochure-9.pdf) for details.
* compliant to definitions and guides of official bodies. For SI units, TU aims for compliance with the definitions issued by Bureau International des Poids et Mesures (BIPM). See [link to bimp.org](https://www.bipm.org/documents/20126/41483022/SI-Brochure-9.pdf) for details.
* (type)safe
* easy to use
* light weight
Expand All @@ -149,7 +149,7 @@ TU is released under the MIT license. https://mit-license.org/
### Types

The intrinsic data type used by TU is defined in the preprocessor macro `TU_TYPE`.
`TU_TYPE` can be `float` or `double`. All values and floting point template argumets will have the type defined by `TU_TYPE`.
`TU_TYPE` can be `float` or `double`. All values and floating point template argumets will have the type defined by `TU_TYPE`.

### Namespaces
The main namespace of TU is `tu`.
Expand All @@ -159,10 +159,10 @@ Functionality inside `tu` that is located in the namespace `internal` is not pub

#### s, m, kg, A, K, mol, cd

These are the base units with floting point template arguments that determins the power of the base unit.
These are the base units with floating point template arguments that determins the power of the base unit.
The base units are used to build `Coherent_unit`s

The definition of each base unit looks as follws where the unit is denoted `X`.
The definition of each base unit looks as follows where the unit is denoted `X`.

```c++
template<TU_TYPE p>
Expand Down Expand Up @@ -340,7 +340,7 @@ Note also that `Coherent_unit` does not have a `value` member but only a `base_v

If we would like a specific `Unit` representation of the operation, we have to explicitly state the `Unit` as in the first example and the result of the operation will be used to construct the desired `Unit`.

Applying the `+` and `-` operators on `Unit`s that dont have the same underlying `Coherent_unit` will result in compilation failure e.g. it is not possible to add to variables of type `newton` and `second`.
Applying the `+` and `-` operators on `Unit`s that don't have the same underlying `Coherent_unit` will result in compilation failure e.g. it is not possible to add to variables of type `newton` and `second`.

#### \* /

Expand Down Expand Up @@ -401,7 +401,7 @@ std::cout << ch.base_value << std::endl; // prints 2.5 * 10^-5
Coherent_unit<s<(TU_TYPE)0.0>, m<(TU_TYPE)2.0>, kg<(TU_TYPE)0.0>, A<(TU_TYPE)0.0>, K<(TU_TYPE)0.0>, mol<(TU_TYPE)0.0>, cd<(TU_TYPE)0.0>>;
```

To construc a `Unit` directly we could do
To construct a `Unit` directly we could do

```c++
Unit<prefix::milli, metre> me(5.0f);
Expand All @@ -412,7 +412,7 @@ std::cout << m2.value << std::endl; // prints 2.5 * 10^-2
Note that `Unit<prefix::milli, metre_squared>` means 10<sup>-3</sup>m<sup>2
</sup> and not </sup>(mm)<sup>2</sup>
To the unit </sup>(mm)<sup>2</sup> is equivavlent to `Unit<prefix::micro, metre_squared>`
To the unit </sup>(mm)<sup>2</sup> is equivalent to `Unit<prefix::micro, metre_squared>`
Note that the power is not restricted to integers.
Expand All @@ -423,7 +423,7 @@ The operation
```c++
sqrt(unit).
```
is equivialent to
is equivalent to

```c++
pow<0.5>(unit).
Expand Down

0 comments on commit d316e77

Please sign in to comment.