Uploaded image for project: 'Axis2'
  1. Axis2
  2. AXIS2-5252

Additional Fraction Constructor

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Not A Problem
    • None
    • None
    • None
    • All

    Description

      I'm writing some code who's output includes fractional measurements meant for human consumption. I need a constructor for Fraction which allows you to restrict the denominators to a finite set. This is necessary due to the fact that real-world tools are only available with certain fractions. For example, it's next to impossible to find a ruler with 1/7 inch marked .

      I'm attaching a patch which implements the functionality. I've attempted to mimic the style of the existing code as much as possible. One caveat: I don't speak French so the french error message is a computer-generated translation and probably very poor.

      Attachments

        1. math.patch
          8 kB
          Travis Hanna

        Activity

          People

            Unassigned Unassigned
            thanna Travis Hanna
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: