Skip to content

BoundingBox.Interval could have fixed-length version #9

@vreuter

Description

@vreuter

A new interval type could be constructed, accepting an additional type parameter which would be a subtype of Singleton, and for which we may required a Numeric instance (or something similar from spire). Each value of such an interval type would then have its length encoded at the type level, which would facilitate defining total functions for operations which we only wish to define for same-length intervals (e.g. adding, averaging, etc.). Rather than having a runtime check on interval length equality, the operation would only be defined for operands (intervals) for which the equality of length was statically guaranteed/proven.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions