add algorithm that calculates next power of two

This commit is contained in:
Indre Maksimovaite
2021-10-11 20:13:36 +03:00
parent 5f601fac8d
commit 372348f64c
4 changed files with 36 additions and 4 deletions

View File

@@ -40,8 +40,7 @@ const fahrenheitToRankine = (fahrenheit) => {
const kelvinToCelsius = (kelvin) => {
// Wikipedia reference: https://en.wikipedia.org/wiki/Kelvin
// Wikipedia reference: https://en.wikipedia.org/wiki/Celsius
return Math.round((kelvin) - 273.15)
return Math.round((kelvin) - 273.15)
}
const kelvinToFahrenheit = (kelvin) => {
@@ -53,7 +52,7 @@ const kelvinToFahrenheit = (kelvin) => {
const kelvinToRankine = (kelvin) => {
// Wikipedia reference: https://en.wikipedia.org/wiki/Kelvin
// Wikipedia reference: https://en.wikipedia.org/wiki/Rankine_scale
return Math.round(( (kelvin) * 9 / 5))
return Math.round(((kelvin) * 9 / 5))
}
const rankineToCelsius = (rankine) => {