Skip to main content

Timeline for SI unit converter

Current License: CC BY-SA 3.0

15 events
when toggle format what by license comment
Dec 3, 2015 at 10:53 history edited BCdotWEB CC BY-SA 3.0
added 1 character in body
Dec 3, 2015 at 7:24 history edited πάντα ῥεῖ CC BY-SA 3.0
edited body
Dec 3, 2015 at 1:03 comment added jpmc26 "codes intend" --> code's intent
Dec 3, 2015 at 0:36 comment added anon if (factor == 1) { factor = unit; } seems kinda useless. I don't know if it's that good to promote it. Aside from that, great first answer! Welcome!
Dec 2, 2015 at 20:31 history edited πάντα ῥεῖ CC BY-SA 3.0
added 100 characters in body
Dec 2, 2015 at 20:20 history edited πάντα ῥεῖ CC BY-SA 3.0
added 469 characters in body
Dec 2, 2015 at 20:07 comment added πάντα ῥεῖ @BatmanB. I was just answering from a straight forward POV how to improve your existing code. Of course for something production ready, you should go with Caridorc's generic solution, which avoids if/else or swich/case at all.
Dec 2, 2015 at 19:40 comment added πάντα ῥεῖ The switch is just what you're asking the user and what unit the want to have converted into another. So add just more numbers, and interpretet these mapping to factors internally. In general keep that input not directly related to values given from input.
Dec 2, 2015 at 19:37 history edited πάντα ῥεῖ CC BY-SA 3.0
added 75 characters in body
Dec 2, 2015 at 19:34 comment added BatmanB. I tried but I can't combine decimal with switch... Or at least I don't know how.
Dec 2, 2015 at 19:33 comment added BatmanB. Yes I'm thinking about doing the rest (Kilo, Mega, Giga ,Tera ) but I don't know if I can do it :D
Dec 2, 2015 at 19:31 history edited πάντα ῥεῖ CC BY-SA 3.0
added 91 characters in body
Dec 2, 2015 at 19:17 history edited πάντα ῥεῖ CC BY-SA 3.0
added 91 characters in body
Dec 2, 2015 at 19:00 review First posts
Dec 2, 2015 at 19:14
Dec 2, 2015 at 18:59 history answered πάντα ῥεῖ CC BY-SA 3.0