Another update from ingydotnet^djgoku
This commit is contained in:
parent
91df62d461
commit
948b86eafa
7604 changed files with 108452 additions and 22726 deletions
|
|
@ -0,0 +1,14 @@
|
|||
var k2c = k => k - 273.15
|
||||
var k2r = k => k * 1.8
|
||||
var k2f = k => k2r(k) - 459.67
|
||||
|
||||
Number.prototype.toMaxDecimal = function (d) {
|
||||
return +this.toFixed(d) + ''
|
||||
}
|
||||
|
||||
function kCnv(k) {
|
||||
document.write( k,'K° = ', k2c(k).toMaxDecimal(2),'C° = ', k2r(k).toMaxDecimal(2),'R° = ', k2f(k).toMaxDecimal(2),'F°<br>' )
|
||||
}
|
||||
|
||||
kCnv(21)
|
||||
kCnv(295)
|
||||
Loading…
Add table
Add a link
Reference in a new issue