Skip to content

Functions to return integers #149

Description

@mikem8891

truc, round, floor, and ceil return integers wrapped in Ratio<T> instead of the underlying integer T and for 3 of those functions (round, floor, and ceil) there are no functions provided to get the integers directly. There could also be a remainder function which would be a integer equivalent of frac. It would be nice to have a quotient function but to_integer already provides that functionality.

These functions would be more efficient than their Ratio<T> returning counterparts. Arithmetic between Integers and Ratios is also more efficient than between two Ratios.

Maybe *_to_int() would be a good API?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions