Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Not a Problem
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Environment:
      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.

      1. math.patch
        8 kB
        Travis Hanna

        Activity

        Hide
        Travis Hanna added a comment -

        Patch which adds new constructor to Fraction. Includes unit test and new error message. French error message should be reviewed by a native French speaker. It's machine generated.

        Show
        Travis Hanna added a comment - Patch which adds new constructor to Fraction. Includes unit test and new error message. French error message should be reviewed by a native French speaker. It's machine generated.
        Hide
        Travis Hanna added a comment -

        I'm not sure how I posted this to Axis2. Was intended for commons math. Please disregard.

        Show
        Travis Hanna added a comment - I'm not sure how I posted this to Axis2. Was intended for commons math. Please disregard.

          People

          • Assignee:
            Unassigned
            Reporter:
            Travis Hanna
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development