Measurement Conversion created in JavaScript

March 09, 2022
screenshot of converter

Created my own conversion page, some of the reasons for this, you may have run across these issues also: ton of ads on page and overlay ads; the ads and the converter all look the same; the one that made me decide to create my own was the conversion was wrong. While I did research and testing I cannot guarantee that this is 100% accurate. The data I pulled to make the calculation could have been wrong and the testing results I checked against could have been off. However most of the tests usually matched to the equations I used in the program creation.

Graphic design measurements:

This is the basic conversions I keep using in graphic design and web development, thought it best just to keep them all together; since the line between the two is very blurred at times. For pixels I went with the average 96ppi if I find later I need other sizes or only use one size I’ll either add or change that. For the centimeter and millimeter this is a simple conversion but thought it safer to just do both on here.

Computer calculations:

For Computer Binary I kept finding different calculators and conversion numbers I went with the ones that I found the most. An issue with two sites, that I found, didn’t match anything else I checked against, these were both for the binary conversions. There could be different ways in converting for binary I used the 1 MB equals 1024 KB method. Another issue that came up in testing was where it rounded, some would round quickly, like no to two decimals others would have maybe 10 places after the decimal.

I have the numbers fixed to be more precise as needed, but set to a max of 4 from graphic and 8 for computer after the decimal and removes any trailing zeroes.

Page located at: https://www.lynnamacher.com/converter/

Used W3.org for as many of the conversion calculations as possible. The ones they didn’t have I looked online and would check multiple sources and used the most common between them.

https://www.w3.org/TR/css3-values/#absolute-lengths

Related Articles

Creating our own Basic Local Chatbot

Creating our own Basic Local Chatbot

This is a current work in progress there is still some issues with the program. It will at times have its own conversation and sometimes add empty assistant tags to the replies. This is all from the first 2 links in the code. After receiving my Azura AI-900...

read more
Python – Birthday List

Python – Birthday List

Birthday List Python Program Worked on a project for a publication to pull the birthdays of their members quickly. To help demonstrate what they were working with; they had two Word files containing tables of birthday months, the dates for the month were not in order...

read more

Pin It on Pinterest

Share This