Skip to content

Iterator<Item=(u32, u32)> for Discrete/Stepwise enums (ResolutionInfo and IntervalInfo) #12

@Boscop

Description

@Boscop

Re: #10

In the example Stepwise variant represents
{ ∀k≥0,m≥0 | (min(320 + kstep.0, 640), min(240 + mstep.1, 360)) }

It would be useful to have an iterator over this, for all enums with Discrete/Stepwise, i.e. ResolutionInfo and IntervalInfo.

E.g. it could be done by merging both types into one, as they are basically the same, and then making both an alias for that type. And then implementing Iterator<Item=(u32, u32)> for this type.

Having an iterator would make it easier to find the best setting to choose, as they can be zipped and mapped with a custom weighing function between fps and resolution, and then find the .max() :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions