jeremycarlsten / fraction-ify Goto Github PK
View Code? Open in Web Editor NEWChanges html text input to display decimals as fractions
License: MIT License
Changes html text input to display decimals as fractions
License: MIT License
The method used to caluclate greatest common denominator seems to not be working to find the simplest form of
the fraction when very large or small numbers are used.
For example:
the decimal .0000025
comes out to: "1152921504606847/461168601842738800000"
but really simplifies to: 1/400000 (according to an online calculator. Need to check the math)
I would like to see the plugin handle numbers greater than one.
For example:
1.5 -> 1 1/2
1.25 -> 1 1/4
99.625 -> 99 5/8
I would like to see the ability to use the type="number" with this. the up and down arrows could change the fraction. The issue is of course that a fraction is not a number. I need to find a way to split apart the display text and the actual value.
Once the value is changed the input is a string value not a number. Not as friendly as It could be.
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.