Migrate celsius/fahrenheit conversions
This commit is contained in:
@ -1,16 +0,0 @@
|
||||
---
|
||||
title: celsiusToFahrenheit
|
||||
tags: math,beginner
|
||||
---
|
||||
|
||||
Celsius to Fahrenheit temperature conversion.
|
||||
|
||||
Follows the conversion formula `F = 1.8C + 32`.
|
||||
|
||||
```js
|
||||
const celsiusToFahrenheit = degrees => 1.8 * degrees + 32;
|
||||
```
|
||||
|
||||
```js
|
||||
celsiusToFahrenheit(33) // 91.4
|
||||
```
|
||||
@ -1,16 +0,0 @@
|
||||
---
|
||||
title: fahrenheitToCelsius
|
||||
tags: math,beginner
|
||||
---
|
||||
|
||||
Fahrenheit to Celsius temperature conversion.
|
||||
|
||||
Follows the conversion formula `C = (F - 32) * 5/9`.
|
||||
|
||||
```js
|
||||
const fahrenheitToCelsius = degrees => (degrees - 32) * 5/9;
|
||||
```
|
||||
|
||||
```js
|
||||
fahrenheitToCelsius(32); // 0
|
||||
```
|
||||
Reference in New Issue
Block a user