hansolo / converter Goto Github PK
View Code? Open in Web Editor NEWA Java based unit converter
License: Apache License 2.0
A Java based unit converter
License: Apache License 2.0
Nice lib! Would be helpful to document the units in README as well:
Cheers
Converter volumeConverter_m3 = new Converter(VOLUME, CUBIC_METER);
double meter = 3.0;
double liter = volumeConverter_m3.convert(meter, LITER);
System.out.println("liter :: " + liter);
System.out.println("liter :: " + BigDecimal.valueOf(liter).toPlainString());
This conversion showing result
liter :: 3.0000000000000005E-6
liter :: 0.0000030000000000000005
Is there a way to get the DATA conversions to calculate from the different definitions that exist where in some cases, k = 1000 and in others, k = 1024? I realize that the formal definition is 1024 but all file systems don't necessarily use the formal definition, so it would be nice to have the library be settable to one or the other.
change 'MACH(new Unit(Category.SPEED, "M", "Mach", new BigDecimal("0.00293866995797")))'
to 'MACH(new Unit(Category.SPEED, "M", "Mach", new BigDecimal("343")))'
and change 'HORSEPOWER(new Unit(Category.WORK, "hp", "Horsepower", new BigDecimal("735.49875"))),'
to 'HORSEPOWER(new Unit(Category.WORK, "hp", "Horsepower", new BigDecimal("745.699872"))),'
really like the script - really helpful.
Can you add this to the main maven repo?
the factor is incorrect, current is 0.4472271914, however, should be 0.44704
current:
MILES_PER_HOUR(new Unit(Category.SPEED, "mph", "Miles per hour", new BigDecimal("0.4472271914")))
should be : MILES_PER_HOUR(new Unit(Category.SPEED, "mph", "Miles per hour", new BigDecimal("0.44704")))
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.