Top

Temperature converter


mIRC Code
+ 1 likes
Please Register to submit score.
Bookmark and Share
Average Score  10.0 (of 1 scores)
Date Added  Sep 22, 2009
Last Updated  Sep 22, 2009
Tags  celsius  converter  farenheit  function  identifier 

Introduction

Just a simple identifier, once again, but someone other than me should find it useful.

Usage:

$temconv(N, [c])

Takes a temperature and converts it. Assumes input is farenheit and converts to celcius, unless the c parameter is specified, in which case it does the opposite. (hope that that makes sense ;_))

Can be useful for weather scripts.

Grab the Code

alias tempconv {
    if ($2 == c) {
        return $round($calc((($1 - 32) / 9) * 5), 0)
    }
    else {
 
        return $round($calc((($1 * 9) / 5) + 32), 0)
    }
}

Comments

  (0)  RSS

Commenting Options

Register or Login to Hawkee.com or use your Facebook or Twitter account by clicking the corresponding button below.

  
Bottom