Fractional Thinking

My Conversion app for Windows Phone 7 is going to have a couple of components for fraction arithmetic — it’s a “conversion”, with one panel converting back and forth between a decimal and a fraction (and vice versa).  You know, what kind of fraction does 1.687 form? 

If you’re wondering what use that could be, consider what if you have a decimal value for a measurement you want to translate to a length of a board you need to cut off?  Not many tape measures are divided off in in decimal equivalents (at least in the United States).  So ConversionPlus will find the exact fraction, or if you prefer, the nearest common fraction (like nearest 1/2, 1/4, 1/8, 1/16 or 1/32) — or, given a fraction, what the decimal equivalent. 

 The other component is out-and-out fraction arithmetic.  You want to know what the sum of 32/7 and 23/4 is?  Bingo.

Well, that’s all good and well, and I can display the decimal value in a textbox-like component, in calculator-style:

But what do you do about the Fraction?  My initial foray was this:

 But this SUCKS.  Even if it works, kind of.  What I settled on was taking the three items (whole, numerator, and denominator) and creating a single control out of them (using an image of a fraction bar):

Now, isn’t that much nicer?

This entry was posted in Miscellaneous. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s