Merge pull request #832 from Qo2770/master
[FEATURE] Add Kilometers/Hour to Miles/Hour conversion and reverse
This commit is contained in:
14
snippets_archive/kmphToMph.md
Normal file
14
snippets_archive/kmphToMph.md
Normal file
@ -0,0 +1,14 @@
|
||||
### kmphToMph
|
||||
|
||||
Convert kilometers/hour to miles/hour.
|
||||
|
||||
Multiply the constant of proportionality with the argument.
|
||||
|
||||
```js
|
||||
const kmphToMph = (kmph) => 0.621371192 * kmph;
|
||||
```
|
||||
|
||||
```js
|
||||
kmphToMph(10); // 16.09344000614692
|
||||
kmphToMph(345.4); // 138.24264965280207
|
||||
```
|
||||
14
snippets_archive/mphToKmph.md
Normal file
14
snippets_archive/mphToKmph.md
Normal file
@ -0,0 +1,14 @@
|
||||
### mphToKmph
|
||||
|
||||
Convert miles/hour to kilometers/hour.
|
||||
|
||||
Multiply the constant of proportionality with the argument.
|
||||
|
||||
```js
|
||||
const mphToKmph = (mph) => 1.6093440006146922 * mph;
|
||||
```
|
||||
|
||||
```js
|
||||
mphToKmph(10); // 16.09344000614692
|
||||
mphToKmph(85.9); // 138.24264965280207
|
||||
```
|
||||
Reference in New Issue
Block a user