Skip to content

Remove automatic pixel rounding from AspectRatio #141

Open
@NickEntin

Description

See #140 for original motivation:

A (much more breaking) alternative that might be worth considering here is removing pixel rounding from AspectRatio. I'd argue we're being a little too magical today with the rounding, since it's not clear whether your resulting size will be wider/taller than the intended aspect ratio with rounding applied. It would be nice to make any applied rounding more explicit, e.g.

aspectRatio.size(forWidth: ...).ceiledToPixel()

or

aspectRatio.size(forWidth: ...).flooredToPixel()

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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