Skip to content

Commit

Permalink
Add conversion Kelvin to Fahrenheit (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
fabianfisahn authored Mar 1, 2024
1 parent a37599e commit 5de00a1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@

if (inputFormat == 'k') {
if (outputFormat == 'c') return value - utils.RATIOS.CELCIUS_IN_KELVIN;
if (outputFormat == 'f') return (1.8 * (value - 273)) + 32;
}

// Just return input if input/output formats are not recognised.
Expand Down

0 comments on commit 5de00a1

Please sign in to comment.