Migrate celsius/fahrenheit conversions
This commit is contained in:
16
snippets/fahrenheitToCelsius.md
Normal file
16
snippets/fahrenheitToCelsius.md
Normal file
@ -0,0 +1,16 @@
|
||||
---
|
||||
title: fahrenheitToCelsius
|
||||
tags: math,beginner
|
||||
---
|
||||
|
||||
Converts Fahrenheit to Celsius.
|
||||
|
||||
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