fey_packer 0.1.1

A 2D rectangle packer.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use fey_math::Vec2U;

/// An item to be packed.
pub struct Item<T> {
    pub size: Vec2U,
    pub data: T,
}

impl<T> Item<T> {
    /// Creates a new item to be packed.
    pub const fn new(size: Vec2U, data: T) -> Self {
        Self { size, data }
    }
}