/    Sign up×
Community /Pin to ProfileBookmark

Unit convertor

Hi,

I’ve made a unit convertor which currently converts units of length mass (weight) and area. All of these have just two types of unit (metric and imperial). But when I come to do temperature, I’ll have 2 problems:

To convert between fahrenheit and celsius you have to both times (or divide) and add (or take away).

To convert between celsius and kelvin you have to add (or minus). I’m wondering if I put celsius and kelvin in the same group as they’re closely related (fahrenheit would go in a different group)or all three units (fahrenheit, celcius and kelvin) each in a different group, where I’d have to have a different combination of add/multiply to convert between each one.

Does anyone know of an efficient way to do this?

Thanks,

Neil

[upl-file uuid=64b73e3a-db86-42ae-a62f-b96a85a1c4de size=3kB]newest2.txt[/upl-file]

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@neil9999authorOct 02.2004 — Just found a bug, make the first select box this:

<select id="uni" onchange="if(this.options[this.options.selectedIndex].text=='Select one'){alert('Please select one!'); this.options.selectedIndex=1;};cho(this)"><option value="">Select one</option><option value="3.28080">Length</option><option value="10.76400">Area</option><option value="0.00221">Weight</option></select>

Neil
×

Success!

Help @neil9999 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.20,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...