collectiveidea / unicode_math

Fun Ruby extensions for doing math with Unicode
MIT License
47 stars 8 forks source link

Fractional Float output #7

Closed dbushong closed 10 years ago

dbushong commented 11 years ago

There's probably a cleaner way of doing this monkey patch, but the idea is now you can:

irb(main):002:0> ¾ * ½
=> ⅜
tbugai commented 11 years ago

Add some tests and we'll get it merged.

swistak commented 11 years ago

It'd be probably better to use 'rational' library instead of floats.

dbushong commented 11 years ago

It'd be probably better to use 'rational' library instead of floats.

I'll let the project as a whole make that call; the input side uses floats, so I'll just be consistent for now.