Introduction
A simple extension that converts a decimal number to a fraction.
Version: 2
Blocks
DecimalToFraction
Converts a decimal to a fraction.
Returns: text
Parameters: number = number (double), separator = text
GetDenominator
Returns the denominator of the fraction from the decimal.
Parameters: number = double
GetNumerator
Returns the numerator of the fraction from the decimal.
Parameters: number = double
Can this be done with built-in blocks?
Yes and no. As @ABG and I found out in this post, it really depends on what decimal you are converting. For some reason, AI2 floats decimals that are smaller than 0.00001. Hence, I recommend you to use this extension - you don't know what the user inputs.
Downloads
TXT: Decimal2Fraction.txt (2.8 KB)
AIX: com.gordonlu.decimal2fraction.aix (6.4 KB)
Rate my extension!
- Good extension!
- Bad extension.
0 voters
Made with Niotron IDE.
Kindly PM me if you have any questions! Also, if you like my extension, please
like it! It takes some effort for me to make it...
Votes and likes tell me the general user feedback of my extension. If you read this extension, please take 20 seconds to drop by and give a vote / like!
If you have any features that you want to add and you know the code, PM me.