I want this:
In website have var number = 0.33
and I want var second = fractions of variable 'number'
, and if "number" fractions change : second
will change.
But how?
I want this:
In website have var number = 0.33
and I want var second = fractions of variable 'number'
, and if "number" fractions change : second
will change.
But how?
You can use Erik Garrison's fraction.js library to do that and more fractional operations.
var second = new Fraction(.033);
console.log(second.numerator + '/' + second.denominator);