-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Clipping windows are often defined to be ((0, 0), (w - 1, h - 1))
, where (w, h)
is the unsigned resolution of an image or a screen (generally, a 2D array). Usually, these windows are much smaller than the coordinate space.
Currently, clipping windows use the same type as the coordinate space. It would be nice to have mixed-integer operations where any window type W0
can be used with any coordinate type C0
. Something like:
let clipped: AnyOctant<u8> = Clip::<u8>::new((0, 0), (255, 255))?
.any_octant::<i16>((-1280, -64), (127, 630))?;
This can't be combined with const in this form today, since there is no way to implement the method for each type parameter inherently. However, some other API could be possible.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request