1 unstable release

0.1.0 Aug 7, 2024

#823 in Math

Custom license

16KB
302 lines

Bog

The highly-modular abstraction standard.

Usage

The recommended design pattern to be used with this library is the basic type definition wrapper...

type Position = bog::Xy<u16>;

And implementing custom features should be done through extension traits...

trait PositionImpl {
    fn custom_x_getter(&self) -> u16;
}

impl PositionImpl for Position {
    fn custom_x_getter(&self) -> u16 {
        self.x
    }
}

With the following results...

let pos_a = Position::new(1, 2);

assert_eq!(pos_a.custom_x_getter(), 1);

Features

Name Rect X-Y X-Y-Z
default
all
rect
xy
xyz

lib.rs:

Bog

The highly-modular abstraction standard.

No runtime deps

Features